aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/org/traccar/protocol/FifotrackProtocolDecoder.java2
-rw-r--r--test/org/traccar/protocol/FifotrackProtocolDecoderTest.java3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/FifotrackProtocolDecoder.java b/src/org/traccar/protocol/FifotrackProtocolDecoder.java
index 9c0f6be5a..a4b7932e6 100644
--- a/src/org/traccar/protocol/FifotrackProtocolDecoder.java
+++ b/src/org/traccar/protocol/FifotrackProtocolDecoder.java
@@ -37,7 +37,7 @@ public class FifotrackProtocolDecoder extends BaseProtocolDecoder {
.text("$$")
.number("d+,") // length
.number("(d+),") // imei
- .number("d+,") // index
+ .number("x+,") // index
.expression("[^,]+,") // type
.number("(d+)?,") // alarm
.number("(dd)(dd)(dd)") // date
diff --git a/test/org/traccar/protocol/FifotrackProtocolDecoderTest.java b/test/org/traccar/protocol/FifotrackProtocolDecoderTest.java
index fa45516a2..7cde4b5c9 100644
--- a/test/org/traccar/protocol/FifotrackProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/FifotrackProtocolDecoderTest.java
@@ -11,6 +11,9 @@ public class FifotrackProtocolDecoderTest extends ProtocolTest {
FifotrackProtocolDecoder decoder = new FifotrackProtocolDecoder(new FifotrackProtocol());
verifyPosition(decoder, text(
+ "$$105,866104023179743,AB,A00,,161007085534,A,54.738791,25.271918,0,350,151,0,17929,0000,0,,246|1|65|96DB,936|0*0B"));
+
+ verifyPosition(decoder, text(
"$$103,866104023179743,5,A00,,161006192841,A,54.738791,25.271918,0,342,200,0,4265,0000,0,,246|1|65|96DB,9C4|0*75"));
verifyPosition(decoder, text(