aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2024-07-29 15:57:14 -0700
committerAnton Tananaev <anton@traccar.org>2024-07-29 15:57:14 -0700
commit44752e41007aff70d16af5fad6fb49b7ed0ef2b2 (patch)
tree40cc4128a03da65825b8f08ab4c45ba474d618b7 /src/main
parent2788174193def918a3a1a5be3bbed24c9613323f (diff)
downloadtrackermap-server-44752e41007aff70d16af5fad6fb49b7ed0ef2b2.tar.gz
trackermap-server-44752e41007aff70d16af5fad6fb49b7ed0ef2b2.tar.bz2
trackermap-server-44752e41007aff70d16af5fad6fb49b7ed0ef2b2.zip
Support Magnet 4G GPS battery
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java b/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java
index 443da28a3..c581211ea 100644
--- a/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java
@@ -595,6 +595,11 @@ public class HuabaoProtocolDecoder extends BaseProtocolDecoder {
case 0xE2:
position.set(Position.KEY_FUEL_LEVEL, buf.readUnsignedInt() * 0.1);
break;
+ case 0xE3:
+ buf.readUnsignedByte(); // reserved
+ position.set(Position.KEY_BATTERY_LEVEL, buf.readUnsignedByte());
+ position.set(Position.KEY_BATTERY, buf.readUnsignedShort() / 100.0);
+ break;
case 0xE6:
while (buf.readerIndex() < endIndex) {
int sensorIndex = buf.readUnsignedByte();