diff options
-rw-r--r-- | src/org/traccar/protocol/Tk103ProtocolDecoder.java | 2 | ||||
-rw-r--r-- | test/org/traccar/protocol/Tk103ProtocolDecoderTest.java | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/Tk103ProtocolDecoder.java b/src/org/traccar/protocol/Tk103ProtocolDecoder.java index b0186a52b..493287011 100644 --- a/src/org/traccar/protocol/Tk103ProtocolDecoder.java +++ b/src/org/traccar/protocol/Tk103ProtocolDecoder.java @@ -140,7 +140,7 @@ public class Tk103ProtocolDecoder extends BaseProtocolDecoder { // Milage String milage = parser.group(index++); if (milage != null) { - extendedInfo.set("milage", Integer.parseInt(milage, 16)); + extendedInfo.set("milage", Long.parseLong(milage, 16)); } position.setExtendedInfo(extendedInfo.toString()); diff --git a/test/org/traccar/protocol/Tk103ProtocolDecoderTest.java b/test/org/traccar/protocol/Tk103ProtocolDecoderTest.java index f8df401fe..18e6142ad 100644 --- a/test/org/traccar/protocol/Tk103ProtocolDecoderTest.java +++ b/test/org/traccar/protocol/Tk103ProtocolDecoderTest.java @@ -15,6 +15,9 @@ public class Tk103ProtocolDecoderTest extends ProtocolDecoderTest { assertNull(decoder.decode(null, null, "(090411121854BP0000001234567890HSO")); verify(decoder.decode(null, null, + "(01029131573BR00150428A3801.6382N02351.0159E000.0080729278.7800000000LEF9ECB9C)")); + + verify(decoder.decode(null, null, "(035988863964BP05000035988863964110524A4241.7977N02318.7561E000.0123536356.5100000000L000946BB")); verify(decoder.decode(null, null, |