aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-07-13 23:51:07 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2019-07-13 23:51:07 -0700
commit7fd59ea42fa31a01d1164103735691a30c711580 (patch)
treec7ab3264d3f65563e2cc19fd903024380cd18d01 /src/main
parent5f2fc476b549fa8555d6d764dbd8279fa754fc49 (diff)
downloadtrackermap-server-7fd59ea42fa31a01d1164103735691a30c711580.tar.gz
trackermap-server-7fd59ea42fa31a01d1164103735691a30c711580.tar.bz2
trackermap-server-7fd59ea42fa31a01d1164103735691a30c711580.zip
Fix time decoding
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/traccar/protocol/Minifinder2ProtocolDecoder.java5
1 files changed, 5 insertions, 0 deletions
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();