diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2018-04-18 05:09:08 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2018-04-18 05:09:08 +1200 |
commit | 430aeaa159e01d21966a20c77cdaf9aed0fa0730 (patch) | |
tree | 4617941b355309894639981ce93b908a4b7e08bb /src/org/traccar/protocol/TotemProtocolDecoder.java | |
parent | 4a5eece13341722fbd20d299ce28bbbcdfc146bd (diff) | |
download | trackermap-server-430aeaa159e01d21966a20c77cdaf9aed0fa0730.tar.gz trackermap-server-430aeaa159e01d21966a20c77cdaf9aed0fa0730.tar.bz2 trackermap-server-430aeaa159e01d21966a20c77cdaf9aed0fa0730.zip |
Decode Totem SOS button
Diffstat (limited to 'src/org/traccar/protocol/TotemProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/TotemProtocolDecoder.java | 3 |
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)); } |