diff options
-rw-r--r-- | src/org/traccar/protocol/Tk103ProtocolDecoder.java | 4 | ||||
-rw-r--r-- | test/org/traccar/protocol/Tk103ProtocolDecoderTest.java | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/org/traccar/protocol/Tk103ProtocolDecoder.java b/src/org/traccar/protocol/Tk103ProtocolDecoder.java index a0998d50d..a76c208b5 100644 --- a/src/org/traccar/protocol/Tk103ProtocolDecoder.java +++ b/src/org/traccar/protocol/Tk103ProtocolDecoder.java @@ -118,12 +118,12 @@ public class Tk103ProtocolDecoder extends BaseProtocolDecoder { int battery = parser.nextInt(); if (battery != 65535) { - position.set(Position.KEY_BATTERY, battery); + position.set(Position.KEY_BATTERY, battery * 0.01); } int power = parser.nextInt(); if (power != 65535) { - position.set(Position.KEY_POWER, power); + position.set(Position.KEY_POWER, power * 0.1); } return position; diff --git a/test/org/traccar/protocol/Tk103ProtocolDecoderTest.java b/test/org/traccar/protocol/Tk103ProtocolDecoderTest.java index bd54a4ade..b15d7894e 100644 --- a/test/org/traccar/protocol/Tk103ProtocolDecoderTest.java +++ b/test/org/traccar/protocol/Tk103ProtocolDecoderTest.java @@ -23,7 +23,7 @@ public class Tk103ProtocolDecoderTest extends ProtocolTest { "(088047194605BZ00,510,010,36e6,932c,43,36e6,766b,36,36e6,7668,32")); verifyAttributes(decoder, text( - "(013632651491,ZC20,040613,040137,6,42,112,0")); + "(013632651491,ZC20,040613,040137,6,421,112,0")); verifyAttributes(decoder, text( "(864768010159785,ZC20,291015,030413,3,362,65535,255")); |