From 82a6fc308efde0e274b143dd2f5261c30774c3fe Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 19 Dec 2022 05:49:00 -0800 Subject: Support JXYD JX08 data --- src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/main/java/org') diff --git a/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java b/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java index cb747fc2e..60477af8f 100644 --- a/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java @@ -455,6 +455,9 @@ public class HuabaoProtocolDecoder extends BaseProtocolDecoder { case 0x02: position.set(Position.KEY_FUEL_LEVEL, buf.readUnsignedShort() * 0.1); break; + case 0x2b: + position.set(Position.KEY_FUEL_CONSUMPTION, buf.readUnsignedInt()); + break; case 0x30: position.set(Position.KEY_RSSI, buf.readUnsignedByte()); break; @@ -588,6 +591,9 @@ public class HuabaoProtocolDecoder extends BaseProtocolDecoder { position.set(Position.KEY_BATTERY, buf.readUnsignedShort() * 0.001); position.set(Position.KEY_SATELLITES, buf.readUnsignedByte()); break; + case 0xF3: + position.set(Position.KEY_ARMED, buf.readUnsignedByte() > 0); + break; case 0xFE: if (length == 1) { position.set(Position.KEY_BATTERY_LEVEL, buf.readUnsignedByte()); @@ -626,6 +632,7 @@ public class HuabaoProtocolDecoder extends BaseProtocolDecoder { } break; default: + System.out.println("subtype " + String.format("%x", subtype)); break; } buf.readerIndex(endIndex); -- cgit v1.2.3