diff options
author | Abyss777 <abyss@fox5.ru> | 2016-08-16 11:41:53 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2016-08-16 11:41:53 +0500 |
commit | 87a8bf3f5cff9b2e537594d0a13371ed8f06fcea (patch) | |
tree | 223ef63962e9618a3e422e8e8047ca7f2f3aecd2 /src/org/traccar/protocol/IdplProtocolDecoder.java | |
parent | 70bea1304ded17bb8a94ce8495d1e395e7cdf748 (diff) | |
download | trackermap-server-87a8bf3f5cff9b2e537594d0a13371ed8f06fcea.tar.gz trackermap-server-87a8bf3f5cff9b2e537594d0a13371ed8f06fcea.tar.bz2 trackermap-server-87a8bf3f5cff9b2e537594d0a13371ed8f06fcea.zip |
- Added alarm decoding for 5 protocols
Diffstat (limited to 'src/org/traccar/protocol/IdplProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/IdplProtocolDecoder.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/IdplProtocolDecoder.java b/src/org/traccar/protocol/IdplProtocolDecoder.java index 5b8ec7897..4fdf9d677 100644 --- a/src/org/traccar/protocol/IdplProtocolDecoder.java +++ b/src/org/traccar/protocol/IdplProtocolDecoder.java @@ -97,7 +97,9 @@ public class IdplProtocolDecoder extends BaseProtocolDecoder { parser.next(); // vehicle status position.set(Position.KEY_POWER, parser.nextInt()); position.set(Position.KEY_BATTERY, parser.nextDouble()); - position.set(Position.KEY_ALARM, parser.nextInt()); + if (parser.nextInt() == 1) { + position.set(Position.KEY_ALARM, Position.ALARM_SOS); + } parser.nextInt(); // body tamper parser.nextInt(); // ac status position.set(Position.KEY_IGNITION, parser.nextInt() == 1); |