diff options
author | jcardus <asklocation.net@gmail.com> | 2024-06-29 02:33:39 +0100 |
---|---|---|
committer | jcardus <asklocation.net@gmail.com> | 2024-06-29 02:33:39 +0100 |
commit | 025f2dff7c93917484ed7b37ca49d4d958bfe450 (patch) | |
tree | 1107f55c7f91d78fed212e7de88c1dc485cece0e /src/main/java | |
parent | 90e5c5a7ede05d5d06abda6474d593b5a7843c9e (diff) | |
download | trackermap-server-025f2dff7c93917484ed7b37ca49d4d958bfe450.tar.gz trackermap-server-025f2dff7c93917484ed7b37ca49d4d958bfe450.tar.bz2 trackermap-server-025f2dff7c93917484ed7b37ca49d4d958bfe450.zip |
Implemented power and battery for aovx v series
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java b/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java index d010a8fe0..e99caad5e 100644 --- a/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java @@ -710,6 +710,8 @@ public class HuabaoProtocolDecoder extends BaseProtocolDecoder { position.set(Position.KEY_BATTERY, buf.readUnsignedShort() * 0.001); position.set(Position.KEY_SATELLITES, buf.readUnsignedByte()); break; + case 0xF1: + position.set(Position.KEY_POWER, buf.readUnsignedInt() * 0.001); case 0xF3: while (buf.readerIndex() < endIndex) { int extendedType = buf.readUnsignedShort(); @@ -772,6 +774,11 @@ public class HuabaoProtocolDecoder extends BaseProtocolDecoder { } } break; + case 0xF7: + position.set(Position.KEY_BATTERY, buf.readUnsignedInt() * 0.001); + position.set(Position.KEY_CHARGE, buf.readUnsignedByte() >= 2); + position.set(Position.KEY_BATTERY_LEVEL, buf.readUnsignedByte()); + break; case 0xFE: if (length == 1) { position.set(Position.KEY_BATTERY_LEVEL, buf.readUnsignedByte()); |