diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-10-08 00:58:24 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2016-10-08 00:58:24 +1300 |
commit | 5451efd2f5d343cb6c7e6964055305103b4fbdd2 (patch) | |
tree | 5ddfc71d38894df8b6b6bc48d9d1a70779b68ebd | |
parent | bf0bf92ddadee86fc92841fe6087e5a7910bc0a2 (diff) | |
download | traccar-server-5451efd2f5d343cb6c7e6964055305103b4fbdd2.tar.gz traccar-server-5451efd2f5d343cb6c7e6964055305103b4fbdd2.tar.bz2 traccar-server-5451efd2f5d343cb6c7e6964055305103b4fbdd2.zip |
Another small Fifotrack decoder fix
-rw-r--r-- | src/org/traccar/protocol/FifotrackProtocolDecoder.java | 2 | ||||
-rw-r--r-- | test/org/traccar/protocol/FifotrackProtocolDecoderTest.java | 3 |
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( |