aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2020-06-16 22:25:39 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2020-06-16 22:25:46 -0700
commit298fbd76d79c3cb22766d00a37198ee9d970d277 (patch)
tree1ffa835b7dff71d0e0e275d9417653ac320001da /src/main
parent617462f3de96e9a15bb1c01af3e6b022e7eab684 (diff)
downloadtraccar-server-298fbd76d79c3cb22766d00a37198ee9d970d277.tar.gz
traccar-server-298fbd76d79c3cb22766d00a37198ee9d970d277.tar.bz2
traccar-server-298fbd76d79c3cb22766d00a37198ee9d970d277.zip
Update PST protocol
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/traccar/protocol/PstProtocolDecoder.java2
1 files changed, 2 insertions, 0 deletions
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));