aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-05-25 21:21:26 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2018-05-25 21:21:26 +1200
commit6034ce81e0753aece45bb4644170e238b765e8d9 (patch)
tree644a363c8a844ed2b47d7e30320d83af14f010b3
parent7a1791b67cbb47033f818cce2c57322c3161eef0 (diff)
downloadtrackermap-server-6034ce81e0753aece45bb4644170e238b765e8d9.tar.gz
trackermap-server-6034ce81e0753aece45bb4644170e238b765e8d9.tar.bz2
trackermap-server-6034ce81e0753aece45bb4644170e238b765e8d9.zip
Additional Sinocastel alarms
-rw-r--r--src/org/traccar/model/Position.java2
-rw-r--r--src/org/traccar/protocol/CastelProtocolDecoder.java12
2 files changed, 14 insertions, 0 deletions
diff --git a/src/org/traccar/model/Position.java b/src/org/traccar/model/Position.java
index e8d3e4092..b0fe7a79b 100644
--- a/src/org/traccar/model/Position.java
+++ b/src/org/traccar/model/Position.java
@@ -119,9 +119,11 @@ public class Position extends Message {
public static final String ALARM_ACCIDENT = "accident";
public static final String ALARM_TOW = "tow";
public static final String ALARM_IDLE = "idle";
+ public static final String ALARM_HIGH_RPM = "highRpm";
public static final String ALARM_ACCELERATION = "hardAcceleration";
public static final String ALARM_BRAKING = "hardBraking";
public static final String ALARM_CORNERING = "hardCornering";
+ public static final String ALARM_LANE_CHANGE = "laneChange";
public static final String ALARM_FATIGUE_DRIVING = "fatigueDriving";
public static final String ALARM_POWER_CUT = "powerCut";
public static final String ALARM_POWER_RESTORED = "powerRestored";
diff --git a/src/org/traccar/protocol/CastelProtocolDecoder.java b/src/org/traccar/protocol/CastelProtocolDecoder.java
index db6f24eeb..2ac79f9cf 100644
--- a/src/org/traccar/protocol/CastelProtocolDecoder.java
+++ b/src/org/traccar/protocol/CastelProtocolDecoder.java
@@ -251,9 +251,21 @@ public class CastelProtocolDecoder extends BaseProtocolDecoder {
case 0x05:
position.set(Position.KEY_ALARM, Position.ALARM_BRAKING);
break;
+ case 0x06:
+ position.set(Position.KEY_ALARM, Position.ALARM_IDLE);
+ break;
+ case 0x07:
+ position.set(Position.KEY_ALARM, Position.ALARM_TOW);
+ break;
+ case 0x08:
+ position.set(Position.KEY_ALARM, Position.ALARM_HIGH_RPM);
+ break;
case 0x09:
position.set(Position.KEY_ALARM, Position.ALARM_POWER_ON);
break;
+ case 0x0B:
+ position.set(Position.KEY_ALARM, Position.ALARM_LANE_CHANGE);
+ break;
case 0x0C:
position.set(Position.KEY_ALARM, Position.ALARM_CORNERING);
break;