diff options
Diffstat (limited to 'src/main/java/org/traccar/protocol')
-rw-r--r-- | src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java b/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java index 841e2235d..a562267aa 100644 --- a/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java @@ -298,19 +298,22 @@ public class HuabaoProtocolDecoder extends BaseProtocolDecoder { break; case 0xEB: while (buf.readerIndex() < endIndex) { - int tenetLength = buf.readUnsignedShort(); - int tenetType = buf.readUnsignedShort(); - switch (tenetType) { + int extendedLength = buf.readUnsignedShort(); + int extendedType = buf.readUnsignedShort(); + switch (extendedType) { case 0x0001: position.set("fuel1", buf.readUnsignedShort() * 0.1); buf.readUnsignedByte(); // unused break; + case 0x0004: + position.set(Position.KEY_POWER, buf.readUnsignedShort() * 0.01); + break; case 0x0023: position.set("fuel2", Double.parseDouble( buf.readCharSequence(6, StandardCharsets.US_ASCII).toString())); break; default: - buf.skipBytes(tenetLength - 2); + buf.skipBytes(extendedLength - 2); break; } } |