From e2402983eb53f6cd384cdd09cc0d217772023b9a Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 9 May 2023 08:16:00 -0700 Subject: Expand transparent data --- .../traccar/protocol/HuabaoProtocolDecoder.java | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'src/main/java') diff --git a/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java b/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java index 1aebba4e6..f0b7cf6ca 100644 --- a/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java @@ -877,6 +877,22 @@ public class HuabaoProtocolDecoder extends BaseProtocolDecoder { case 0x0539: position.set(Position.KEY_FUEL_CONSUMPTION, buf.readUnsignedShort() * 0.01); break; + case 0x052D: + position.set(Position.KEY_COOLANT_TEMP, buf.readUnsignedByte() - 40); + break; + case 0x0530: + position.set(Position.KEY_POWER, buf.readUnsignedShort() * 0.001); + break; + case 0x0535: + position.set(Position.KEY_OBD_SPEED, buf.readUnsignedShort() * 0.1); + break; + case 0x0536: + position.set(Position.KEY_RPM, buf.readUnsignedShort()); + break; + case 0x0547: + case 0x0548: + position.set(Position.KEY_THROTTLE, buf.readUnsignedByte()); + break; default: switch (length) { case 1: @@ -898,6 +914,17 @@ public class HuabaoProtocolDecoder extends BaseProtocolDecoder { decodeCoordinates(position, buf); position.setTime(time); break; + case 0x02: + count = buf.readUnsignedByte(); + for (int i = 0; i < count; i++) { + buf.readUnsignedInt(); // system id + int codeCount = buf.readUnsignedShort(); + for (int j = 0; j < codeCount; j++) { + buf.skipBytes(16); // code + } + } + decodeCoordinates(position, buf); + break; case 0x03: count = buf.readUnsignedByte(); for (int i = 0; i < count; i++) { -- cgit v1.2.3