From c41c8edd7e4d275885cbef72212e553a2c86c9b4 Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Mon, 1 Aug 2016 12:10:17 +0500 Subject: - Added a few more protocols - Removed useless alarms - Optimizations --- src/org/traccar/protocol/AutoFonProtocolDecoder.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/org/traccar/protocol/AutoFonProtocolDecoder.java') diff --git a/src/org/traccar/protocol/AutoFonProtocolDecoder.java b/src/org/traccar/protocol/AutoFonProtocolDecoder.java index dd0f54af0..90e8ca103 100644 --- a/src/org/traccar/protocol/AutoFonProtocolDecoder.java +++ b/src/org/traccar/protocol/AutoFonProtocolDecoder.java @@ -169,7 +169,9 @@ public class AutoFonProtocolDecoder extends BaseProtocolDecoder { position.setDeviceId(deviceSession.getDeviceId()); short status = buf.readUnsignedByte(); - position.set(Position.KEY_ALARM, BitUtil.check(status, 7)); + if (BitUtil.check(status, 7)) { + position.set(Position.KEY_ALARM, Position.ALARM_GENERAL); + } position.set(Position.KEY_BATTERY, BitUtil.to(status, 7)); buf.skipBytes(2); // remaining time -- cgit v1.2.3