diff options
-rw-r--r-- | src/org/traccar/protocol/Vt200ProtocolDecoder.java | 2 | ||||
-rw-r--r-- | test/org/traccar/protocol/Vt200ProtocolDecoderTest.java | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/Vt200ProtocolDecoder.java b/src/org/traccar/protocol/Vt200ProtocolDecoder.java index 30fd88615..d08107b16 100644 --- a/src/org/traccar/protocol/Vt200ProtocolDecoder.java +++ b/src/org/traccar/protocol/Vt200ProtocolDecoder.java @@ -84,7 +84,7 @@ public class Vt200ProtocolDecoder extends BaseProtocolDecoder { if (!BitUtil.check(flags, 1)) { position.setLatitude(-position.getLatitude()); } - if (!BitUtil.check(flags, 1)) { + if (!BitUtil.check(flags, 2)) { position.setLongitude(-position.getLongitude()); } diff --git a/test/org/traccar/protocol/Vt200ProtocolDecoderTest.java b/test/org/traccar/protocol/Vt200ProtocolDecoderTest.java index 42ed4a652..9ce01c966 100644 --- a/test/org/traccar/protocol/Vt200ProtocolDecoderTest.java +++ b/test/org/traccar/protocol/Vt200ProtocolDecoderTest.java @@ -10,6 +10,9 @@ public class Vt200ProtocolDecoderTest extends ProtocolTest { Vt200ProtocolDecoder decoder = new Vt200ProtocolDecoder(new Vt200Protocol()); + verifyPosition(decoder, binary( + "28192030961807208200210101b919011818375801245774036424612500160917000003aa008800007b00aa3429")); + verifyNull(decoder, binary( "286310373094563082002701033d010817143327c68a14841e00c27f550e9a000000000c000000084700200120007d01af260b29")); |