aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/NavisProtocolDecoder.java
diff options
context:
space:
mode:
authorninioe <ninioe@gmail.com>2016-08-07 09:56:04 +0300
committerninioe <ninioe@gmail.com>2016-08-07 09:56:04 +0300
commitc1c5a5fd34402a4e9b0840a7b960c38371dd9748 (patch)
tree1c04413e2f2cc450c4be23ef459597b2b4e9f776 /src/org/traccar/protocol/NavisProtocolDecoder.java
parente26d81c7430d8668b3af1bbf15672f06a855d6d0 (diff)
parentdea7617218de2cbc7ebd930b4342aa35ffedcd8b (diff)
downloadtrackermap-server-c1c5a5fd34402a4e9b0840a7b960c38371dd9748.tar.gz
trackermap-server-c1c5a5fd34402a4e9b0840a7b960c38371dd9748.tar.bz2
trackermap-server-c1c5a5fd34402a4e9b0840a7b960c38371dd9748.zip
Merge remote-tracking branch 'refs/remotes/tananaev/master'
# Conflicts: # web/app/view/LoginController.js
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());