aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorjfunston83 <jfunston@gmail.com>2019-10-26 06:07:18 -0600
committerGitHub <noreply@github.com>2019-10-26 06:07:18 -0600
commit4ccd054983ecf633b5832738ee64199c6b6696ee (patch)
tree86717581f608f6d99d65d915e52542bc7bf63551 /src/main/java
parent9726f97fe3d1f83351bf98b0a61361aa371c43be (diff)
downloadtrackermap-server-4ccd054983ecf633b5832738ee64199c6b6696ee.tar.gz
trackermap-server-4ccd054983ecf633b5832738ee64199c6b6696ee.tar.bz2
trackermap-server-4ccd054983ecf633b5832738ee64199c6b6696ee.zip
Update DmtProtocolDecoder.java
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/traccar/protocol/DmtProtocolDecoder.java12
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) {