diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-06-19 21:12:29 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-06-19 21:12:29 +1200 |
commit | 2737d1c994a4d8e45946a701cb93ae57dd5fd802 (patch) | |
tree | 18ad95ef2d5c2393c5204a9db5c87c0abfa22355 | |
parent | a3e01d6998005db012530be3456e8d06b5d91c5b (diff) | |
download | trackermap-server-2737d1c994a4d8e45946a701cb93ae57dd5fd802.tar.gz trackermap-server-2737d1c994a4d8e45946a701cb93ae57dd5fd802.tar.bz2 trackermap-server-2737d1c994a4d8e45946a701cb93ae57dd5fd802.zip |
Add extra parameter to gps103
-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 f96f30090..38e6ec834 100644 --- a/src/org/traccar/protocol/Gps103ProtocolDecoder.java +++ b/src/org/traccar/protocol/Gps103ProtocolDecoder.java @@ -56,6 +56,7 @@ public class Gps103ProtocolDecoder extends BaseProtocolDecoder { "([^,]+)?,?" + "([^,]+)?,?" + "([^,]+)?,?" + + "([^,]+)?,?" + ".*"); @Override @@ -197,6 +198,7 @@ public class Gps103ProtocolDecoder extends BaseProtocolDecoder { position.set(Event.PREFIX_IO + 2, parser.group(index++)); position.set(Event.PREFIX_IO + 3, parser.group(index++)); position.set(Event.PREFIX_IO + 4, parser.group(index++)); + position.set(Event.PREFIX_IO + 5, parser.group(index++)); return position; } diff --git a/test/org/traccar/protocol/Gps103ProtocolDecoderTest.java b/test/org/traccar/protocol/Gps103ProtocolDecoderTest.java index c4cb4fd49..3e63d4b34 100644 --- a/test/org/traccar/protocol/Gps103ProtocolDecoderTest.java +++ b/test/org/traccar/protocol/Gps103ProtocolDecoderTest.java @@ -120,6 +120,9 @@ public class Gps103ProtocolDecoderTest extends ProtocolDecoderTest { verify(decoder.decode(null, null, null, "imei:359710047424644,tracker,150506224036,,F,154037.000,A,0335.2785,N,09841.1543,E,3.03,337.54,,0,0,45.16%,,;")); + + verify(decoder.decode(null, null, null, + "imei:865328023776874,acc off,150619152221,,F,072218.000,A,5439.8489,N,02518.5945,E,0.00,,,1,1,0.0,0.0,23.0,;")); } |