diff options
author | Anton Tananaev <anton@traccar.org> | 2024-06-24 06:40:28 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2024-06-24 06:40:28 -0700 |
commit | e9b1392ddc72bd8d5adcde69012e90cb4004c930 (patch) | |
tree | 29ba3304134d29aac20d637a8a178e6c84fc85fd /src | |
parent | d365fa63940976ec53c3b94842c3fa6ad45af242 (diff) | |
download | trackermap-server-e9b1392ddc72bd8d5adcde69012e90cb4004c930.tar.gz trackermap-server-e9b1392ddc72bd8d5adcde69012e90cb4004c930.tar.bz2 trackermap-server-e9b1392ddc72bd8d5adcde69012e90cb4004c930.zip |
Change GT06 RFID decoding
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java | 2 | ||||
-rw-r--r-- | src/test/java/org/traccar/protocol/Gt06ProtocolDecoderTest.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java b/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java index d088077e2..eb8ba2375 100644 --- a/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java @@ -960,8 +960,8 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder { } if (type == MSG_GPS_LBS_RFID) { - buf.readUnsignedByte(); // validity position.set(Position.KEY_DRIVER_UNIQUE_ID, ByteBufUtil.hexDump(buf.readSlice(8))); + buf.readUnsignedByte(); // validity } if (buf.readableBytes() == 3 + 6 || buf.readableBytes() == 3 + 4 + 6) { diff --git a/src/test/java/org/traccar/protocol/Gt06ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Gt06ProtocolDecoderTest.java index aba0a6293..9e9d3667d 100644 --- a/src/test/java/org/traccar/protocol/Gt06ProtocolDecoderTest.java +++ b/src/test/java/org/traccar/protocol/Gt06ProtocolDecoderTest.java @@ -31,7 +31,7 @@ public class Gt06ProtocolDecoderTest extends ProtocolTest { verifyAttribute(decoder, binary( "7878281718060e021831c6026e8acc0c361b1000140001cc00286d000f4dbf0000012ca7e001000004b2630d0a"), - Position.KEY_DRIVER_UNIQUE_ID, "0000012ca7e00100"); + Position.KEY_DRIVER_UNIQUE_ID, "bf0000012ca7e001"); verifyNotNull(decoder, binary( "78782732180214123324ca0162bdf0041f45d900190b0a02d4000bc5270000ec025206040202005e07e10d0a")); |