diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2021-09-14 23:14:56 -0700 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2021-09-14 23:14:56 -0700 |
commit | 1a40dfa1fc286f03ab4ce4468984a226e68afe0c (patch) | |
tree | 2ed6842f14aa2513e2e00c81423f28055f961543 /src | |
parent | ae00c6a6741497036bf7257439e4b9aca41cae40 (diff) | |
download | traccar-server-1a40dfa1fc286f03ab4ce4468984a226e68afe0c.tar.gz traccar-server-1a40dfa1fc286f03ab4ce4468984a226e68afe0c.tar.bz2 traccar-server-1a40dfa1fc286f03ab4ce4468984a226e68afe0c.zip |
Decode additional data
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java | 13 |
1 files changed, 13 insertions, 0 deletions
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; } |