diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2018-05-08 13:13:46 -0700 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2018-05-08 13:13:46 -0700 |
commit | e35ba89765eda5919870b3dfe43230974cf77a5e (patch) | |
tree | 5dbf7038b14ed37f21d8d46aeaa5bb9cfbd16822 | |
parent | bf64e10bf3062a2d76dd2302f3c169e8f7478aa1 (diff) | |
download | traccar-server-e35ba89765eda5919870b3dfe43230974cf77a5e.tar.gz traccar-server-e35ba89765eda5919870b3dfe43230974cf77a5e.tar.bz2 traccar-server-e35ba89765eda5919870b3dfe43230974cf77a5e.zip |
Handle partial GPRMC sentence
-rw-r--r-- | src/org/traccar/protocol/T55ProtocolDecoder.java | 2 | ||||
-rw-r--r-- | test/org/traccar/protocol/T55ProtocolDecoderTest.java | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/T55ProtocolDecoder.java b/src/org/traccar/protocol/T55ProtocolDecoder.java index be3cb5f67..dfe0d541f 100644 --- a/src/org/traccar/protocol/T55ProtocolDecoder.java +++ b/src/org/traccar/protocol/T55ProtocolDecoder.java @@ -53,7 +53,7 @@ public class T55ProtocolDecoder extends BaseProtocolDecoder { .number(",(d+)") // imei .expression(",([01])") // ignition .number(",(d+)") // fuel - .number(",(d+)").optional(5) // battery + .number(",(d+)").optional(7) // battery .number("((?:,d+)+)?") // parameters .any() .compile(); diff --git a/test/org/traccar/protocol/T55ProtocolDecoderTest.java b/test/org/traccar/protocol/T55ProtocolDecoderTest.java index ec699f111..298540e3b 100644 --- a/test/org/traccar/protocol/T55ProtocolDecoderTest.java +++ b/test/org/traccar/protocol/T55ProtocolDecoderTest.java @@ -20,6 +20,12 @@ public class T55ProtocolDecoderTest extends ProtocolTest { "358244017671308")); verifyPosition(decoder, text( + "$GPGGA,082350.000,5355.0314,N,01044.1271,E,1,10,0.7,-46.0,M,0.0,M,0.0,0000")); + + verifyPosition(decoder, text( + "$GPRMC,082350.000,A,5355.0314,N,01044.1271,E,26.20,184.27,080518,,")); + + verifyPosition(decoder, text( "$GPRMC,192350.000,V,0000.0000,N,00000.0000,E,,,110318,,*12")); verifyPosition(decoder, text( |