aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-03-02 14:41:35 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2018-03-02 14:41:35 +1300
commit9246922750d211b1c6ec36d38a63928f3e21a0a6 (patch)
treead04d176443595ce7133b2c294e2d50a5fdaf952
parent10cc148834ac5bb694d9ba482f65a2e71faebbb4 (diff)
downloadtraccar-server-9246922750d211b1c6ec36d38a63928f3e21a0a6.tar.gz
traccar-server-9246922750d211b1c6ec36d38a63928f3e21a0a6.tar.bz2
traccar-server-9246922750d211b1c6ec36d38a63928f3e21a0a6.zip
Revert: Decode additional Totem alarm codes
-rw-r--r--src/org/traccar/protocol/TotemProtocolDecoder.java20
1 files changed, 1 insertions, 19 deletions
diff --git a/src/org/traccar/protocol/TotemProtocolDecoder.java b/src/org/traccar/protocol/TotemProtocolDecoder.java
index 1c5130a6c..2f205ba58 100644
--- a/src/org/traccar/protocol/TotemProtocolDecoder.java
+++ b/src/org/traccar/protocol/TotemProtocolDecoder.java
@@ -167,26 +167,12 @@ public class TotemProtocolDecoder extends BaseProtocolDecoder {
switch (value) {
case 0x01:
return Position.ALARM_SOS;
- case 0x02:
- return Position.ALARM_OVERSPEED;
- case 0x04:
- return Position.ALARM_GEOFENCE_EXIT;
- case 0x05:
- return Position.ALARM_GEOFENCE_ENTER;
- case 0x06:
- return Position.ALARM_TOW;
case 0x10:
return Position.ALARM_LOW_BATTERY;
case 0x11:
return Position.ALARM_OVERSPEED;
- case 0x12:
- return Position.ALARM_LOW_POWER;
- case 0x13:
- return Position.ALARM_LOW_BATTERY;
case 0x30:
return Position.ALARM_PARKING;
- case 0x40:
- return Position.ALARM_SHOCK;
case 0x42:
return Position.ALARM_GEOFENCE_EXIT;
case 0x43:
@@ -259,11 +245,7 @@ public class TotemProtocolDecoder extends BaseProtocolDecoder {
private boolean decode3(Position position, Parser parser) {
if (parser.hasNext()) {
- short alarm = Short.parseShort(parser.next(), 16);
- position.set(Position.KEY_ALARM, decodeAlarm(alarm));
- if (alarm >= 0x21 && alarm <= 0x28) {
- position.set(Position.PREFIX_IN + ((alarm - 0x21) / 2 + 1), alarm % 2 > 0);
- }
+ position.set(Position.KEY_ALARM, decodeAlarm(Short.parseShort(parser.next(), 16)));
}
position.setTime(parser.nextDateTime(Parser.DateTimeFormat.DMY_HMS));