aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/IdplProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-08-16 13:48:07 +0300
committerGitHub <noreply@github.com>2016-08-16 13:48:07 +0300
commit376bd7a7342ed46f20b7c0c94d7c9b0074ae99f3 (patch)
tree3e1336a0597ca649f54e2b271a96df4b37273c9b /src/org/traccar/protocol/IdplProtocolDecoder.java
parent70bea1304ded17bb8a94ce8495d1e395e7cdf748 (diff)
parent96f0143b2cbbb93f1c325e1df7c66a2fc3d55b7e (diff)
downloadtrackermap-server-376bd7a7342ed46f20b7c0c94d7c9b0074ae99f3.tar.gz
trackermap-server-376bd7a7342ed46f20b7c0c94d7c9b0074ae99f3.tar.bz2
trackermap-server-376bd7a7342ed46f20b7c0c94d7c9b0074ae99f3.zip
Merge pull request #2219 from Abyss777/alarms_2
Alarm decoding for next protocols
Diffstat (limited to 'src/org/traccar/protocol/IdplProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/IdplProtocolDecoder.java4
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);