aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-04-18 19:22:50 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2019-04-18 19:22:50 -0700
commit03169baaea991d3c343a65ebac3eb3242d743fd0 (patch)
treee5f5f694f9ddd247cd69105e30add6dea626ed2e /src/main/java
parentb81ad0b7a0ef5a5c9d68bbd13b9f46f746c419da (diff)
downloadtraccar-server-03169baaea991d3c343a65ebac3eb3242d743fd0.tar.gz
traccar-server-03169baaea991d3c343a65ebac3eb3242d743fd0.tar.bz2
traccar-server-03169baaea991d3c343a65ebac3eb3242d743fd0.zip
Decode more status options
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/traccar/protocol/ItsProtocolDecoder.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/ItsProtocolDecoder.java b/src/main/java/org/traccar/protocol/ItsProtocolDecoder.java
index 306e2a1f7..313575f27 100644
--- a/src/main/java/org/traccar/protocol/ItsProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/ItsProtocolDecoder.java
@@ -110,6 +110,10 @@ public class ItsProtocolDecoder extends BaseProtocolDecoder {
return Position.ALARM_OVERSPEED;
case "TA":
return Position.ALARM_TAMPERING;
+ case "BD":
+ return Position.ALARM_POWER_CUT;
+ case "BR":
+ return Position.ALARM_POWER_RESTORED;
default:
return null;
}
@@ -158,7 +162,13 @@ public class ItsProtocolDecoder extends BaseProtocolDecoder {
status = parser.next();
}
if (status != null) {
- position.set(Position.KEY_ALARM, decodeAlarm(status));
+ if (status.equals("IN")) {
+ position.set(Position.KEY_IGNITION, true);
+ } else if (status.equals("IF")) {
+ position.set(Position.KEY_IGNITION, false);
+ } else {
+ position.set(Position.KEY_ALARM, decodeAlarm(status));
+ }
}
if (parser.hasNext()) {