diff options
Diffstat (limited to 'src')
-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) { |