aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/org/traccar/protocol/MictrackProtocolDecoder.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/protocol/MictrackProtocolDecoder.java b/src/main/java/org/traccar/protocol/MictrackProtocolDecoder.java
index e83318fa9..7204769b2 100644
--- a/src/main/java/org/traccar/protocol/MictrackProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/MictrackProtocolDecoder.java
@@ -117,7 +117,9 @@ public class MictrackProtocolDecoder extends BaseProtocolDecoder {
position.setNetwork(network);
- position.set(Position.KEY_EVENT, Integer.parseInt(values[index++]));
+ int event = Integer.parseInt(values[index++]);
+ position.set(Position.KEY_ALARM, decodeAlarm(event));
+ position.set(Position.KEY_EVENT, event);
position.set(Position.KEY_BATTERY, Integer.parseInt(values[index++]) * 0.001);
}
@@ -131,7 +133,9 @@ public class MictrackProtocolDecoder extends BaseProtocolDecoder {
index += 4; // fix values
- position.set(Position.KEY_EVENT, Integer.parseInt(values[index++]));
+ int event = Integer.parseInt(values[index++]);
+ position.set(Position.KEY_ALARM, decodeAlarm(event));
+ position.set(Position.KEY_EVENT, event);
position.set(Position.KEY_BATTERY, Integer.parseInt(values[index++]) * 0.001);
}