aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-04-18 05:09:08 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2018-04-18 05:09:08 +1200
commit430aeaa159e01d21966a20c77cdaf9aed0fa0730 (patch)
tree4617941b355309894639981ce93b908a4b7e08bb /src/org
parent4a5eece13341722fbd20d299ce28bbbcdfc146bd (diff)
downloadtraccar-server-430aeaa159e01d21966a20c77cdaf9aed0fa0730.tar.gz
traccar-server-430aeaa159e01d21966a20c77cdaf9aed0fa0730.tar.bz2
traccar-server-430aeaa159e01d21966a20c77cdaf9aed0fa0730.zip
Decode Totem SOS button
Diffstat (limited to 'src/org')
-rw-r--r--src/org/traccar/protocol/TotemProtocolDecoder.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/org/traccar/protocol/TotemProtocolDecoder.java b/src/org/traccar/protocol/TotemProtocolDecoder.java
index 5a2c203d2..841c3c3dc 100644
--- a/src/org/traccar/protocol/TotemProtocolDecoder.java
+++ b/src/org/traccar/protocol/TotemProtocolDecoder.java
@@ -245,6 +245,9 @@ public class TotemProtocolDecoder extends BaseProtocolDecoder {
int io = parser.nextBinInt();
if (pattern == PATTERN1) {
+ if (BitUtil.check(io, 0)) {
+ position.set(Position.KEY_ALARM, Position.ALARM_SOS);
+ }
for (int i = 1; i <= 4; i++) {
position.set(Position.PREFIX_IN + i, BitUtil.check(io, 3 + i));
}