From 298fbd76d79c3cb22766d00a37198ee9d970d277 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 16 Jun 2020 22:25:39 -0700 Subject: Update PST protocol --- src/main/java/org/traccar/protocol/PstProtocolDecoder.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/main/java/org') diff --git a/src/main/java/org/traccar/protocol/PstProtocolDecoder.java b/src/main/java/org/traccar/protocol/PstProtocolDecoder.java index f7ac93e1c..a7cb8ef5c 100644 --- a/src/main/java/org/traccar/protocol/PstProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/PstProtocolDecoder.java @@ -78,6 +78,7 @@ public class PstProtocolDecoder extends BaseProtocolDecoder { position.setDeviceTime(readDate(buf)); int status = buf.readUnsignedByte(); + position.set(Position.KEY_BLOCKED, BitUtil.check(status, 4)); position.set(Position.KEY_IGNITION, BitUtil.check(status, 7)); position.set(Position.KEY_STATUS, status); @@ -100,6 +101,7 @@ public class PstProtocolDecoder extends BaseProtocolDecoder { } break; case 0x10: + position.setValid(true); position.setFixTime(readDate(buf)); position.setLatitude(readCoordinate(buf)); position.setLongitude(readCoordinate(buf)); -- cgit v1.2.3