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/DmtProtocolDecoder.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/protocol/DmtProtocolDecoder.java b/src/main/java/org/traccar/protocol/DmtProtocolDecoder.java
index 58a5a88e3..b36093189 100644
--- a/src/main/java/org/traccar/protocol/DmtProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/DmtProtocolDecoder.java
@@ -184,6 +184,14 @@ public class DmtProtocolDecoder extends BaseProtocolDecoder {
position.set(Position.KEY_IGNITION, BitUtil.check(input, 0));
+ if (!BitUtil.check(input, 1)) {
+ position.set(Position.KEY_ALARM, Position.ALARM_LOW_BATTERY);
+ } else if (!BitUtil.check(input, 2)) {
+ position.set(Position.KEY_ALARM, Position.ALARM_LOW_POWER);
+ } if (BitUtil.check(input, 6)) {
+ position.set(Position.KEY_ALARM, Position.ALARM_TAMPERING);
+ }
+
position.set(Position.KEY_INPUT, input);
position.set(Position.KEY_OUTPUT, output);
position.set(Position.KEY_STATUS, status);