aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/org/traccar/protocol/IntellitracProtocolDecoder.java5
-rw-r--r--test/org/traccar/protocol/IntellitracProtocolDecoderTest.java7
2 files changed, 10 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/IntellitracProtocolDecoder.java b/src/org/traccar/protocol/IntellitracProtocolDecoder.java
index b71237e7f..e45c84ba9 100644
--- a/src/org/traccar/protocol/IntellitracProtocolDecoder.java
+++ b/src/org/traccar/protocol/IntellitracProtocolDecoder.java
@@ -33,7 +33,7 @@ public class IntellitracProtocolDecoder extends BaseProtocolDecoder {
super(serverManager);
}
- static private Pattern pattern = Pattern.compile(
+ private static final Pattern pattern = Pattern.compile(
"(?:.+,)?(\\d+)," + // Device Identifier
"(\\d{4})(\\d{2})(\\d{2})" + // Date (YYYYMMDD)
"(\\d{2})(\\d{2})(\\d{2})," + // Time (HHMMSS)
@@ -47,7 +47,8 @@ public class IntellitracProtocolDecoder extends BaseProtocolDecoder {
"(\\d+)," + // Input
"(\\d+),?" + // Output
"(\\d+\\.\\d+)?,?" + // ADC1
- "(\\d+\\.\\d+)?"); // ADC2
+ "(\\d+\\.\\d+)?" + // ADC2
+ ".*");
@Override
protected Object decode(
diff --git a/test/org/traccar/protocol/IntellitracProtocolDecoderTest.java b/test/org/traccar/protocol/IntellitracProtocolDecoderTest.java
index 351b6136d..59b47ebf3 100644
--- a/test/org/traccar/protocol/IntellitracProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/IntellitracProtocolDecoderTest.java
@@ -47,6 +47,13 @@ public class IntellitracProtocolDecoderTest {
verify(decoder.decode(null, null,
"1010000001,20030105092129,-121.651598,-25.052325,0,0,33,0,1,0,0"));
+
+ verify(decoder.decode(null, null,
+ "1015210962,20131010144712,-77.070037,-12.097935,0,0,77,7,2,2,0,0,139446.8,2095,20131010144712,,0.103,0.000"));
+
+ verify(decoder.decode(null, null,
+ "1003269480,20131126100258,10.32989,49.93836,0,304,217,6,2,0,0,0.000,0.000,20131126100258,0,0,0,-40,0,0,-273,0,0,0,0"));
+
}