Skip to content

Commit

Permalink
Add power cut GT06 alarm (fix traccar#2321)
Browse files Browse the repository at this point in the history
  • Loading branch information
tananaev committed Sep 15, 2016
1 parent 9ee73b1 commit 4e0113f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/org/traccar/model/Position.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ public class Position extends Message {
public static final String ALARM_ACCELETATION = "hardAcceleration";
public static final String ALARM_BREAKING = "hardBreaking";
public static final String ALARM_FATIGUE_DRIVING = "fatigueDriving";
public static final String ALARM_POWER_CUT = "powerCut";

private String protocol;

Expand Down
2 changes: 2 additions & 0 deletions src/org/traccar/protocol/Gt06ProtocolDecoder.java
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ private String decodeAlarm(short value) {
switch (value) {
case 0x01:
return Position.ALARM_SOS;
case 0x02:
return Position.ALARM_POWER_CUT;
case 0x03:
case 0x09:
return Position.ALARM_VIBRATION;
Expand Down

0 comments on commit 4e0113f

Please sign in to comment.