aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol/DmtProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-10-26 15:26:31 -0700
committerGitHub <noreply@github.com>2019-10-26 15:26:31 -0700
commit73c676e4faa3a8d71c9e8880417bd387eed20c7e (patch)
tree9399c3b67e913ae850b4cf97f1234909a1837e0e /src/main/java/org/traccar/protocol/DmtProtocolDecoder.java
parent1f6f8631c6d0a76e7333e59c2f8dc1497f1f5e7b (diff)
parent1a2c46e6f3d95babd6c4f41f6e1a6f8700390352 (diff)
downloadtrackermap-server-73c676e4faa3a8d71c9e8880417bd387eed20c7e.tar.gz
trackermap-server-73c676e4faa3a8d71c9e8880417bd387eed20c7e.tar.bz2
trackermap-server-73c676e4faa3a8d71c9e8880417bd387eed20c7e.zip
Merge pull request #4427 from jfunston83/master
Update DMT protocol to support Run Hours & Odometer
Diffstat (limited to 'src/main/java/org/traccar/protocol/DmtProtocolDecoder.java')
-rw-r--r--src/main/java/org/traccar/protocol/DmtProtocolDecoder.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/protocol/DmtProtocolDecoder.java b/src/main/java/org/traccar/protocol/DmtProtocolDecoder.java
index fabcae002..58a5a88e3 100644
--- a/src/main/java/org/traccar/protocol/DmtProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/DmtProtocolDecoder.java
@@ -213,6 +213,16 @@ public class DmtProtocolDecoder extends BaseProtocolDecoder {
}
}
+ } else if (fieldId == 26) {
+
+ position.set(Position.KEY_ODOMETER_TRIP, buf.readUnsignedIntLE());
+ position.set("tripHours", buf.readUnsignedIntLE() * 1000);
+
+ } else if (fieldId == 27) {
+
+ position.set(Position.KEY_ODOMETER, buf.readUnsignedIntLE());
+ position.set(Position.KEY_HOURS, buf.readUnsignedIntLE() * 1000);
+
}
buf.readerIndex(fieldEnd);