diff options
Diffstat (limited to 'src/org/traccar/protocol/NoranProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/NoranProtocolDecoder.java | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/org/traccar/protocol/NoranProtocolDecoder.java b/src/org/traccar/protocol/NoranProtocolDecoder.java index 7071b9625..5b4533422 100644 --- a/src/org/traccar/protocol/NoranProtocolDecoder.java +++ b/src/org/traccar/protocol/NoranProtocolDecoder.java @@ -91,16 +91,14 @@ public class NoranProtocolDecoder extends BaseProtocolDecoder { position.setValid(BitUtil.check(buf.readUnsignedByte(), 0)); short alarm = buf.readUnsignedByte(); - if (alarm != 0x80) { - if (alarm == 1) { - position.set(Position.KEY_ALARM, Position.ALARM_SOS); - } else if (alarm == 2) { - position.set(Position.KEY_ALARM, Position.ALARM_OVERSPEED); - } else if (alarm == 3) { - position.set(Position.KEY_ALARM, Position.ALARM_GEOFENCE_EXIT); - } else if (alarm == 9) { - position.set(Position.KEY_ALARM, Position.ALARM_POWER_OFF); - } + if (alarm == 1) { + position.set(Position.KEY_ALARM, Position.ALARM_SOS); + } else if (alarm == 2) { + position.set(Position.KEY_ALARM, Position.ALARM_OVERSPEED); + } else if (alarm == 3) { + position.set(Position.KEY_ALARM, Position.ALARM_GEOFENCE_EXIT); + } else if (alarm == 9) { + position.set(Position.KEY_ALARM, Position.ALARM_POWER_OFF); } if (newFormat) { |