aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2023-03-23 09:17:25 -0700
committerAnton Tananaev <anton@traccar.org>2023-03-23 09:17:25 -0700
commitf73263da4800f86203e1aa425b0b7d3243d4b7c3 (patch)
tree7c1b8927e5850bed76c6df18b1a9a8b05fb4c57f /src/main/java/org/traccar
parentee3cbd4aba2e7df2ac2da4292caa87a63b171a87 (diff)
downloadtrackermap-server-f73263da4800f86203e1aa425b0b7d3243d4b7c3.tar.gz
trackermap-server-f73263da4800f86203e1aa425b0b7d3243d4b7c3.tar.bz2
trackermap-server-f73263da4800f86203e1aa425b0b7d3243d4b7c3.zip
Add JT808 power and battery
Diffstat (limited to 'src/main/java/org/traccar')
-rw-r--r--src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java7
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 22c39c2da..ddc3192eb 100644
--- a/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java
@@ -329,6 +329,13 @@ public class HuabaoProtocolDecoder extends BaseProtocolDecoder {
case 0x03:
position.set(Position.KEY_OBD_SPEED, buf.readUnsignedShort() * 0.1);
break;
+ case 0x56:
+ buf.readUnsignedByte(); // power level
+ position.set(Position.KEY_BATTERY_LEVEL, buf.readUnsignedByte());
+ break;
+ case 0x61:
+ position.set(Position.KEY_POWER, buf.readUnsignedShort() * 0.01);
+ break;
case 0x80:
position.set(Position.KEY_OBD_SPEED, buf.readUnsignedByte());
break;