From 7fd59ea42fa31a01d1164103735691a30c711580 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 13 Jul 2019 23:51:07 -0700 Subject: Fix time decoding --- src/main/java/org/traccar/protocol/Minifinder2ProtocolDecoder.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/main/java/org/traccar') diff --git a/src/main/java/org/traccar/protocol/Minifinder2ProtocolDecoder.java b/src/main/java/org/traccar/protocol/Minifinder2ProtocolDecoder.java index 989aa32b9..75c8b11d3 100644 --- a/src/main/java/org/traccar/protocol/Minifinder2ProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/Minifinder2ProtocolDecoder.java @@ -33,6 +33,7 @@ import org.traccar.model.WifiAccessPoint; import java.net.SocketAddress; import java.nio.charset.StandardCharsets; +import java.util.Date; public class Minifinder2ProtocolDecoder extends BaseProtocolDecoder { @@ -149,6 +150,10 @@ public class Minifinder2ProtocolDecoder extends BaseProtocolDecoder { mac.substring(0, mac.length() - 1), rssi)); } break; + case 0x24: + position.setTime(new Date(buf.readUnsignedIntLE() * 1000)); + position.set(Position.KEY_STATUS, buf.readUnsignedIntLE()); + break; case 0x40: buf.readUnsignedIntLE(); // timestamp int heartRate = buf.readUnsignedByte(); -- cgit v1.2.3