diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2020-10-08 14:23:03 -0700 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2020-10-08 14:23:03 -0700 |
commit | 986a1014526e1f00374ed0f130572a51bb4804f4 (patch) | |
tree | 137e9c7313431973626749946b670fbe0b26fb95 | |
parent | 6e85d9023c67cd7f8c35c78665381b6dc732b0a8 (diff) | |
download | trackermap-server-986a1014526e1f00374ed0f130572a51bb4804f4.tar.gz trackermap-server-986a1014526e1f00374ed0f130572a51bb4804f4.tar.bz2 trackermap-server-986a1014526e1f00374ed0f130572a51bb4804f4.zip |
Fix Fifotrack status pattern
-rw-r--r-- | src/main/java/org/traccar/protocol/FifotrackProtocolDecoder.java | 2 | ||||
-rw-r--r-- | src/test/java/org/traccar/protocol/FifotrackProtocolDecoderTest.java | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/FifotrackProtocolDecoder.java b/src/main/java/org/traccar/protocol/FifotrackProtocolDecoder.java index 9bc7cb504..fe42a44d7 100644 --- a/src/main/java/org/traccar/protocol/FifotrackProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/FifotrackProtocolDecoder.java @@ -60,7 +60,7 @@ public class FifotrackProtocolDecoder extends BaseProtocolDecoder { .number("(-?d+),") // altitude .number("(d+),") // odometer .number("d+,") // runtime - .number("(x{4,8}),") // status + .number("(x+),") // status .number("(x+)?,") // input .number("(x+)?,") // output .number("(d+)|") // mcc diff --git a/src/test/java/org/traccar/protocol/FifotrackProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/FifotrackProtocolDecoderTest.java index 88a460854..48b74c904 100644 --- a/src/test/java/org/traccar/protocol/FifotrackProtocolDecoderTest.java +++ b/src/test/java/org/traccar/protocol/FifotrackProtocolDecoderTest.java @@ -12,6 +12,9 @@ public class FifotrackProtocolDecoderTest extends ProtocolTest { FifotrackProtocolDecoder decoder = new FifotrackProtocolDecoder(null); verifyPosition(decoder, buffer( + "$$118,863003046473534,258,A01,,201007231735,V,3.067783,101.672858,0,176,96,189890,0,A0,03,0,502|19|5C1|93349F,196|4E0|6C,1,*13")); + + verifyPosition(decoder, buffer( "$$116,869270049149999,5,A01,4,190925080127,V,-15.804260,35.061506,0,0,1198,0,0,900000C0,02,0,650|10|12C|B24,18B|4C8|72,1,*01")); verifyAttribute(decoder, buffer( |