From 1a40dfa1fc286f03ab4ce4468984a226e68afe0c Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 14 Sep 2021 23:14:56 -0700 Subject: Decode additional data --- .../java/org/traccar/protocol/HuabaoProtocolDecoder.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/main') diff --git a/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java b/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java index 98ab8677f..cd7273f6b 100644 --- a/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java @@ -333,6 +333,9 @@ public class HuabaoProtocolDecoder extends BaseProtocolDecoder { Position.KEY_VIN, buf.readCharSequence(length, StandardCharsets.US_ASCII).toString()); } break; + case 0xAC: + position.set(Position.KEY_ODOMETER, buf.readUnsignedInt()); + break; case 0xD0: long userStatus = buf.readUnsignedInt(); if (BitUtil.check(userStatus, 3)) { @@ -390,6 +393,16 @@ public class HuabaoProtocolDecoder extends BaseProtocolDecoder { } } break; + case 0xED: + String license = buf.readCharSequence(length, StandardCharsets.US_ASCII).toString().trim(); + position.set("driverLicense", license); + break; + case 0xEE: + position.set(Position.KEY_RSSI, buf.readUnsignedByte()); + position.set(Position.KEY_POWER, buf.readUnsignedShort() * 0.01); + position.set(Position.KEY_BATTERY, buf.readUnsignedShort() * 0.01); + position.set(Position.KEY_SATELLITES, buf.readUnsignedByte()); + break; default: break; } -- cgit v1.2.3