aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2020-01-25 09:47:45 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2020-01-25 09:47:45 -0800
commitc8198d40db6e623ee45eff121cdf8cfaa2d58281 (patch)
tree650d1f1eae8d409538462660b50063936904874d /src/main/java/org/traccar
parenta9855cd2df5e364c66bb419eb0ab7fb4d66f2643 (diff)
downloadtrackermap-server-c8198d40db6e623ee45eff121cdf8cfaa2d58281.tar.gz
trackermap-server-c8198d40db6e623ee45eff121cdf8cfaa2d58281.tar.bz2
trackermap-server-c8198d40db6e623ee45eff121cdf8cfaa2d58281.zip
Support driver license
Diffstat (limited to 'src/main/java/org/traccar')
-rw-r--r--src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java b/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java
index c435b6cec..946652b03 100644
--- a/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java
@@ -730,6 +730,14 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
decodeStatus(position, buf);
}
+ if (type == MSG_GPS_LBS_1 && buf.readableBytes() > 75 + 6) {
+ position.set(Position.KEY_ODOMETER, buf.readUnsignedInt());
+ String data = buf.readCharSequence(buf.readUnsignedByte(), StandardCharsets.US_ASCII).toString();
+ buf.readUnsignedByte(); // alarm
+ buf.readUnsignedByte(); // swiped
+ position.set("driverLicense", data.trim());
+ }
+
if (type == MSG_GPS_LBS_1 && buf.readableBytes() == 2 + 6) {
int mask = buf.readUnsignedShort();
position.set(Position.KEY_IGNITION, BitUtil.check(mask, 8 + 7));