diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2020-05-27 19:08:27 -0700 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2020-05-27 19:08:27 -0700 |
commit | ab1022d0c571af09b2036f8694db71537fa430cd (patch) | |
tree | 303e7bd9fc27baa766a4921a6bf7e891a9969b98 /src/main | |
parent | 0373efc4f558041c18274b3a227fb505e7560af3 (diff) | |
download | traccar-server-ab1022d0c571af09b2036f8694db71537fa430cd.tar.gz traccar-server-ab1022d0c571af09b2036f8694db71537fa430cd.tar.bz2 traccar-server-ab1022d0c571af09b2036f8694db71537fa430cd.zip |
Decode RFID driver id
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java b/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java index 946652b03..8d83638a0 100644 --- a/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java @@ -1,5 +1,5 @@ /* - * Copyright 2012 - 2019 Anton Tananaev (anton@traccar.org) + * Copyright 2012 - 2020 Anton Tananaev (anton@traccar.org) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -885,6 +885,13 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder { } return decodeFuelData(position, buf.toString( buf.readerIndex(), buf.readableBytes() - 4 - 2, StandardCharsets.US_ASCII)); + } else if (subType == 0x1b) { + buf.readUnsignedByte(); // header + buf.readUnsignedByte(); // type + position.set(Position.KEY_DRIVER_UNIQUE_ID, ByteBufUtil.hexDump(buf.readSlice(4))); + buf.readUnsignedByte(); // checksum + buf.readUnsignedByte(); // footer + return position; } } else if (type == MSG_X1_PHOTO_DATA) { |