From 1a2c46e6f3d95babd6c4f41f6e1a6f8700390352 Mon Sep 17 00:00:00 2001 From: jfunston83 Date: Sat, 26 Oct 2019 16:25:15 -0600 Subject: Update DmtProtocolDecoder.java --- .../org/traccar/protocol/DmtProtocolDecoder.java | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'src/main') diff --git a/src/main/java/org/traccar/protocol/DmtProtocolDecoder.java b/src/main/java/org/traccar/protocol/DmtProtocolDecoder.java index 63c120eed..c49f06d65 100644 --- a/src/main/java/org/traccar/protocol/DmtProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/DmtProtocolDecoder.java @@ -188,17 +188,6 @@ public class DmtProtocolDecoder extends BaseProtocolDecoder { position.set(Position.KEY_OUTPUT, output); position.set(Position.KEY_STATUS, status); - } else if (fieldId == 27) { - - position.set(Position.KEY_ODOMETER, buf.readUnsignedIntLE()); - position.set(Position.KEY_HOURS, buf.readUnsignedIntLE() * 1000); - - - } else if (fieldId == 26) { - - position.set(Position.KEY_ODOMETER_TRIP, buf.readUnsignedIntLE()); - position.set("TripHours", buf.readUnsignedIntLE() * 1000); - } else if (fieldId == 6) { while (buf.readerIndex() < fieldEnd) { @@ -223,6 +212,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); -- cgit v1.2.3