diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2021-02-02 20:29:59 -0800 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2021-02-02 20:29:59 -0800 |
commit | c19ed090b8d6c959ee8e3b8fab16a2137dc18ccd (patch) | |
tree | d97d35bbae9b5c4be7a84de275c7a8e8f794d43e /src/main/java/org | |
parent | 028e0f9737c5ddf8f7bcc011f0d14923e4ce0646 (diff) | |
download | trackermap-server-c19ed090b8d6c959ee8e3b8fab16a2137dc18ccd.tar.gz trackermap-server-c19ed090b8d6c959ee8e3b8fab16a2137dc18ccd.tar.bz2 trackermap-server-c19ed090b8d6c959ee8e3b8fab16a2137dc18ccd.zip |
Decode additional attributes
Diffstat (limited to 'src/main/java/org')
-rw-r--r-- | src/main/java/org/traccar/protocol/Minifinder2ProtocolDecoder.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/Minifinder2ProtocolDecoder.java b/src/main/java/org/traccar/protocol/Minifinder2ProtocolDecoder.java index 89217a39b..68e9e8dd5 100644 --- a/src/main/java/org/traccar/protocol/Minifinder2ProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/Minifinder2ProtocolDecoder.java @@ -189,13 +189,17 @@ public class Minifinder2ProtocolDecoder extends BaseProtocolDecoder { case 0x28: int beaconFlags = buf.readUnsignedByte(); position.set("tagId", ByteBufUtil.hexDump(buf.readSlice(6))); - buf.readUnsignedByte(); // rssi + position.set("tagRssi", buf.readUnsignedByte()); buf.readUnsignedByte(); // 1m rssi if (BitUtil.check(beaconFlags, 7)) { position.setLatitude(buf.readIntLE() * 0.0000001); position.setLongitude(buf.readIntLE() * 0.0000001); hasLocation = true; } + if (BitUtil.check(beaconFlags, 6)) { + position.set("description", buf.readCharSequence( + endIndex - buf.readerIndex(), StandardCharsets.US_ASCII).toString()); + } break; case 0x30: buf.readUnsignedInt(); // timestamp |