diff options
Diffstat (limited to 'src/main/java/org/traccar/protocol')
-rw-r--r-- | src/main/java/org/traccar/protocol/DmtProtocolDecoder.java | 21 |
1 files changed, 10 insertions, 11 deletions
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); |