aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/NoranProtocolDecoder.java
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2016-08-01 12:10:17 +0500
committerAbyss777 <abyss@fox5.ru>2016-08-01 12:10:17 +0500
commitc41c8edd7e4d275885cbef72212e553a2c86c9b4 (patch)
tree08740df9c0c871e0ad3dc52d7b84c76f18cc912b /src/org/traccar/protocol/NoranProtocolDecoder.java
parent20c2456a9df46eaef04c787ea5471bf31a71f93c (diff)
downloadtrackermap-server-c41c8edd7e4d275885cbef72212e553a2c86c9b4.tar.gz
trackermap-server-c41c8edd7e4d275885cbef72212e553a2c86c9b4.tar.bz2
trackermap-server-c41c8edd7e4d275885cbef72212e553a2c86c9b4.zip
- Added a few more protocols
- Removed useless alarms - Optimizations
Diffstat (limited to 'src/org/traccar/protocol/NoranProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/NoranProtocolDecoder.java18
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) {