diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2018-10-13 14:12:07 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2018-10-13 14:12:07 +1300 |
commit | fc0933a50d0ee2081e98e652ebfa0fc04d2e7069 (patch) | |
tree | 88b2cd6db01ffb0bc427461115f0d2187c71f6fd /src/org | |
parent | 63d6a96b7953b09c013657fa912f4bcf21308477 (diff) | |
download | trackermap-server-fc0933a50d0ee2081e98e652ebfa0fc04d2e7069.tar.gz trackermap-server-fc0933a50d0ee2081e98e652ebfa0fc04d2e7069.tar.bz2 trackermap-server-fc0933a50d0ee2081e98e652ebfa0fc04d2e7069.zip |
Decode X1 GPS RFID data
Diffstat (limited to 'src/org')
-rw-r--r-- | src/org/traccar/protocol/Gt06ProtocolDecoder.java | 8 |
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) { |