aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar/protocol')
-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()) {