aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-10-23 17:12:35 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2019-10-23 17:12:35 -0700
commit8b65c5d87c25e572a31e65df0fac49926381da6c (patch)
treeefbd07e71bc8ab975f9ec0abc4a318680f1dccd6 /src/main/java/org/traccar
parent3a4935f8e1c1631bb9582d384cdd649f976e72db (diff)
downloadtraccar-server-8b65c5d87c25e572a31e65df0fac49926381da6c.tar.gz
traccar-server-8b65c5d87c25e572a31e65df0fac49926381da6c.tar.bz2
traccar-server-8b65c5d87c25e572a31e65df0fac49926381da6c.zip
Decode battery info
Diffstat (limited to 'src/main/java/org/traccar')
-rw-r--r--src/main/java/org/traccar/protocol/Minifinder2ProtocolDecoder.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/protocol/Minifinder2ProtocolDecoder.java b/src/main/java/org/traccar/protocol/Minifinder2ProtocolDecoder.java
index 75c8b11d3..3f8b2d4fe 100644
--- a/src/main/java/org/traccar/protocol/Minifinder2ProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/Minifinder2ProtocolDecoder.java
@@ -117,6 +117,10 @@ public class Minifinder2ProtocolDecoder extends BaseProtocolDecoder {
case 0x02:
position.set(Position.KEY_ALARM, decodeAlarm(buf.readIntLE()));
break;
+ case 0x14:
+ position.set(Position.KEY_BATTERY_LEVEL, buf.readUnsignedByte());
+ position.set(Position.KEY_BATTERY, buf.readUnsignedShortLE() * 0.001);
+ break;
case 0x20:
position.setLatitude(buf.readIntLE() * 0.0000001);
position.setLongitude(buf.readIntLE() * 0.0000001);