From c69b4524fc003613bb70ef98fe99fd6b26277661 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Fri, 25 Dec 2020 11:09:03 -0800 Subject: Update BLE support --- .../java/org/traccar/protocol/Minifinder2ProtocolDecoder.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/main/java/org/traccar/protocol') diff --git a/src/main/java/org/traccar/protocol/Minifinder2ProtocolDecoder.java b/src/main/java/org/traccar/protocol/Minifinder2ProtocolDecoder.java index 5b04992ec..c38fd740d 100644 --- a/src/main/java/org/traccar/protocol/Minifinder2ProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/Minifinder2ProtocolDecoder.java @@ -175,13 +175,10 @@ public class Minifinder2ProtocolDecoder extends BaseProtocolDecoder { } break; case 0x23: - if (endIndex > buf.readerIndex()) { - buf.skipBytes(6); // mac - } - if (endIndex > buf.readerIndex()) { - position.setLatitude(buf.readIntLE() * 0.0000001); - position.setLongitude(buf.readIntLE() * 0.0000001); - } + position.set("tagId", ByteBufUtil.hexDump(buf.readSlice(6))); + position.setLatitude(buf.readIntLE() * 0.0000001); + position.setLongitude(buf.readIntLE() * 0.0000001); + hasLocation = true; break; case 0x24: position.setTime(new Date(buf.readUnsignedIntLE() * 1000)); -- cgit v1.2.3