aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/NavisProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/NavisProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/NavisProtocolDecoder.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/NavisProtocolDecoder.java b/src/org/traccar/protocol/NavisProtocolDecoder.java
index fad24301c..72c5f53c3 100644
--- a/src/org/traccar/protocol/NavisProtocolDecoder.java
+++ b/src/org/traccar/protocol/NavisProtocolDecoder.java
@@ -95,7 +95,11 @@ public class NavisProtocolDecoder extends BaseProtocolDecoder {
buf.skipBytes(6); // event time
- position.set(Position.KEY_ALARM, buf.readUnsignedByte());
+ short armedStatus = buf.readUnsignedByte();
+ position.set(Position.KEY_ARMED, armedStatus & 0x7F);
+ if (BitUtil.check(armedStatus, 7)) {
+ position.set(Position.KEY_ALARM, Position.ALARM_GENERAL);
+ }
position.set(Position.KEY_STATUS, buf.readUnsignedByte());
position.set(Position.KEY_GSM, buf.readUnsignedByte());