aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-10-13 14:12:07 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2018-10-13 14:12:07 +1300
commitfc0933a50d0ee2081e98e652ebfa0fc04d2e7069 (patch)
tree88b2cd6db01ffb0bc427461115f0d2187c71f6fd /src
parent63d6a96b7953b09c013657fa912f4bcf21308477 (diff)
downloadtrackermap-server-fc0933a50d0ee2081e98e652ebfa0fc04d2e7069.tar.gz
trackermap-server-fc0933a50d0ee2081e98e652ebfa0fc04d2e7069.tar.bz2
trackermap-server-fc0933a50d0ee2081e98e652ebfa0fc04d2e7069.zip
Decode X1 GPS RFID data
Diffstat (limited to 'src')
-rw-r--r--src/org/traccar/protocol/Gt06ProtocolDecoder.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/org/traccar/protocol/Gt06ProtocolDecoder.java b/src/org/traccar/protocol/Gt06ProtocolDecoder.java
index 9570eac96..71df47f0a 100644
--- a/src/org/traccar/protocol/Gt06ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gt06ProtocolDecoder.java
@@ -495,6 +495,14 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
buf.readUnsignedShort(), buf.readUnsignedByte(),
buf.readUnsignedShort(), buf.readUnsignedInt())));
+ long driverId = buf.readUnsignedInt();
+ if (driverId > 0) {
+ position.set(Position.KEY_DRIVER_UNIQUE_ID, String.valueOf(driverId));
+ }
+
+ position.set(Position.KEY_BATTERY, buf.readUnsignedShort() * 0.01);
+ position.set(Position.KEY_POWER, buf.readUnsignedShort() * 0.01);
+
return position;
} else if (type == MSG_X1_PHOTO_INFO) {