diff options
-rw-r--r-- | src/org/traccar/protocol/AutoGradeProtocolDecoder.java | 2 | ||||
-rw-r--r-- | test/org/traccar/protocol/AutoGradeProtocolDecoderTest.java | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/AutoGradeProtocolDecoder.java b/src/org/traccar/protocol/AutoGradeProtocolDecoder.java index d8fe8b1a2..744117cfe 100644 --- a/src/org/traccar/protocol/AutoGradeProtocolDecoder.java +++ b/src/org/traccar/protocol/AutoGradeProtocolDecoder.java @@ -89,7 +89,7 @@ public class AutoGradeProtocolDecoder extends BaseProtocolDecoder { position.setCourse(parser.nextDouble()); - int status = (byte) parser.next().charAt(0); + int status = parser.next().charAt(0); position.set(Position.KEY_STATUS, status); position.set(Position.KEY_IGNITION, BitUtil.check(status, 0)); diff --git a/test/org/traccar/protocol/AutoGradeProtocolDecoderTest.java b/test/org/traccar/protocol/AutoGradeProtocolDecoderTest.java index 58e2e4065..a1b715f1c 100644 --- a/test/org/traccar/protocol/AutoGradeProtocolDecoderTest.java +++ b/test/org/traccar/protocol/AutoGradeProtocolDecoderTest.java @@ -11,6 +11,9 @@ public class AutoGradeProtocolDecoderTest extends ProtocolTest { AutoGradeProtocolDecoder decoder = new AutoGradeProtocolDecoder(new AutoGradeProtocol()); verifyPosition(decoder, text( + "(000000001637868324027912356171116A2250.7611N07556.9425E000.9024427197.36\u008eA0000B0000C0000D0000E0000K0000L0000M0000N0000O0000)")); + + verifyPosition(decoder, text( "(000000007322865733022629240170415A1001.1971N07618.1375E0.000145312128.59?A0024B0024C0000D0000E0000K0000L0000M0000N0000O0000")); } |