aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java
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/protocol/Gt06ProtocolDecoder.java
parent7f28cbe9a997fb5271ece16f30383d7cc4241575 (diff)
downloadtrackermap-server-312cd7bd408c978392cacb6ef580288158361ce5.tar.gz
trackermap-server-312cd7bd408c978392cacb6ef580288158361ce5.tar.bz2
trackermap-server-312cd7bd408c978392cacb6ef580288158361ce5.zip
Decode heartbeat battery level
Diffstat (limited to 'src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java')
-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