diff options
author | jfunston83 <jfunston@gmail.com> | 2019-10-26 06:07:18 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-26 06:07:18 -0600 |
commit | 4ccd054983ecf633b5832738ee64199c6b6696ee (patch) | |
tree | 86717581f608f6d99d65d915e52542bc7bf63551 /src/main/java/org | |
parent | 9726f97fe3d1f83351bf98b0a61361aa371c43be (diff) | |
download | traccar-server-4ccd054983ecf633b5832738ee64199c6b6696ee.tar.gz traccar-server-4ccd054983ecf633b5832738ee64199c6b6696ee.tar.bz2 traccar-server-4ccd054983ecf633b5832738ee64199c6b6696ee.zip |
Update DmtProtocolDecoder.java
Diffstat (limited to 'src/main/java/org')
-rw-r--r-- | src/main/java/org/traccar/protocol/DmtProtocolDecoder.java | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/main/java/org/traccar/protocol/DmtProtocolDecoder.java b/src/main/java/org/traccar/protocol/DmtProtocolDecoder.java index 79a80c0c8..56d242612 100644 --- a/src/main/java/org/traccar/protocol/DmtProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/DmtProtocolDecoder.java @@ -189,19 +189,15 @@ public class DmtProtocolDecoder extends BaseProtocolDecoder { position.set(Position.KEY_STATUS, status); } else if (fieldId == 27) { - int odometer = buf.readIntLE(); - int runhours = buf.readIntLE(); - position.set("DeviceOdo", odometer); - position.set("DeviceRunHours", runhours); + position.set(Position.KEY_ODOMETER, buf.readUnsignedIntLE()); + position.set("DeviceRunTime", buf.readUnsignedIntLE()); } else if (fieldId == 26) { - int tripodometer = buf.readIntLE(); - int triprunhours = buf.readIntLE(); - position.set("TripOdo", tripodometer); - position.set("TripRunTime", triprunhours); + position.set(Position.KEY_ODOMETER_TRIP, buf.readUnsignedIntLE()); + position.set("TripRunTime", buf.readUnsignedIntLE()); } else if (fieldId == 6) { |