aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2021-03-06 16:31:49 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2021-03-06 16:31:49 -0800
commit312cd7bd408c978392cacb6ef580288158361ce5 (patch)
tree49b65f998eba6ad6ef5d8cde2e9ecf79da592579 /src/main/java/org/traccar
parent7f28cbe9a997fb5271ece16f30383d7cc4241575 (diff)
downloadtraccar-server-312cd7bd408c978392cacb6ef580288158361ce5.tar.gz
traccar-server-312cd7bd408c978392cacb6ef580288158361ce5.tar.bz2
traccar-server-312cd7bd408c978392cacb6ef580288158361ce5.zip
Decode heartbeat battery level
Diffstat (limited to 'src/main/java/org/traccar')
-rw-r--r--src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java b/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java
index c5e8809e3..b7d6d2595 100644
--- a/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java
@@ -838,7 +838,9 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
buf.readUnsignedShort(); // satellites
buf.readUnsignedByte(); // alarm
buf.readUnsignedByte(); // language
- buf.readUnsignedByte(); // battery
+
+ position.set(Position.KEY_BATTERY_LEVEL, buf.readUnsignedByte());
+
buf.readUnsignedByte(); // working mode
buf.readUnsignedShort(); // working voltage
buf.readUnsignedByte(); // reserved