From 9246922750d211b1c6ec36d38a63928f3e21a0a6 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Fri, 2 Mar 2018 14:41:35 +1300 Subject: Revert: Decode additional Totem alarm codes --- src/org/traccar/protocol/TotemProtocolDecoder.java | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'src/org/traccar') 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)); -- cgit v1.2.3