diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-12-02 05:06:11 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2016-12-02 05:06:11 +1300 |
commit | b39ade422f42d5423db203dab87886d3f8f63dd1 (patch) | |
tree | 7dd6b3b44aea89b4208ca599e96425cb8c54da33 | |
parent | 6782f2ee534494aa24dc73299f71e4227077e037 (diff) | |
download | trackermap-server-b39ade422f42d5423db203dab87886d3f8f63dd1.tar.gz trackermap-server-b39ade422f42d5423db203dab87886d3f8f63dd1.tar.bz2 trackermap-server-b39ade422f42d5423db203dab87886d3f8f63dd1.zip |
Add GPS103 power cut alarm
-rw-r--r-- | src/org/traccar/protocol/Gps103ProtocolDecoder.java | 2 | ||||
-rw-r--r-- | test/org/traccar/protocol/Gps103ProtocolDecoderTest.java | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/org/traccar/protocol/Gps103ProtocolDecoder.java b/src/org/traccar/protocol/Gps103ProtocolDecoder.java index 57dc784d3..d929ae917 100644 --- a/src/org/traccar/protocol/Gps103ProtocolDecoder.java +++ b/src/org/traccar/protocol/Gps103ProtocolDecoder.java @@ -119,6 +119,8 @@ public class Gps103ProtocolDecoder extends BaseProtocolDecoder { return Position.ALARM_POWER_OFF; case "door alarm": return Position.ALARM_DOOR; + case "ac alarm": + return Position.ALARM_POWER_CUT; default: return null; } diff --git a/test/org/traccar/protocol/Gps103ProtocolDecoderTest.java b/test/org/traccar/protocol/Gps103ProtocolDecoderTest.java index 2640051fb..93817b575 100644 --- a/test/org/traccar/protocol/Gps103ProtocolDecoderTest.java +++ b/test/org/traccar/protocol/Gps103ProtocolDecoderTest.java @@ -11,6 +11,9 @@ public class Gps103ProtocolDecoderTest extends ProtocolTest { Gps103ProtocolDecoder decoder = new Gps103ProtocolDecoder(new Gps103Protocol()); verifyAttributes(decoder, text( + "imei:862106021237716,ac alarm,1611291645,,F,204457.000,A,1010.2783,N,06441.0274,W,0.00,,;")); + + verifyAttributes(decoder, text( "imei:359710049057798,OBD,161003192752,1785,,,0,54,96.47%,75,20.00%,1892,0.00,P0134,P0571,,;")); verifyAttributes(decoder, text( |