diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-05-10 15:31:34 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2016-05-10 15:31:34 +1200 |
commit | 96f18a993322a8cac19a83ce806ee1c77eb723e3 (patch) | |
tree | ecc3bb4df13b6fecff355d5b4bfad3d680fe2862 | |
parent | f22357a774d86864ef212bfa2fa086eca99ec0a0 (diff) | |
download | trackermap-server-96f18a993322a8cac19a83ce806ee1c77eb723e3.tar.gz trackermap-server-96f18a993322a8cac19a83ce806ee1c77eb723e3.tar.bz2 trackermap-server-96f18a993322a8cac19a83ce806ee1c77eb723e3.zip |
Add new OBD field to GL200
-rw-r--r-- | src/org/traccar/protocol/Gl200ProtocolDecoder.java | 1 | ||||
-rw-r--r-- | test/org/traccar/protocol/Gl200ProtocolDecoderTest.java | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/org/traccar/protocol/Gl200ProtocolDecoder.java b/src/org/traccar/protocol/Gl200ProtocolDecoder.java index f1211f279..4e78ff6ed 100644 --- a/src/org/traccar/protocol/Gl200ProtocolDecoder.java +++ b/src/org/traccar/protocol/Gl200ProtocolDecoder.java @@ -120,6 +120,7 @@ public class Gl200ProtocolDecoder extends BaseProtocolDecoder { .number("(d{1,3})?,") // throttle .number("(?:d{1,3})?,") // engine load .number("(d{1,3})?,") // fuel level + .expression("(?:[0-9A],)?") // obd protocol .number("(d+),") // odometer .expression(PATTERN_LOCATION.pattern()) .number("(d{1,7}.d)?,") // odometer diff --git a/test/org/traccar/protocol/Gl200ProtocolDecoderTest.java b/test/org/traccar/protocol/Gl200ProtocolDecoderTest.java index 126b3a904..ea28928c0 100644 --- a/test/org/traccar/protocol/Gl200ProtocolDecoderTest.java +++ b/test/org/traccar/protocol/Gl200ProtocolDecoderTest.java @@ -10,6 +10,9 @@ public class Gl200ProtocolDecoderTest extends ProtocolTest { Gl200ProtocolDecoder decoder = new Gl200ProtocolDecoder(new Gl200Protocol()); + verifyPosition(decoder, text( + "+RESP:GTOBD,360201,864251020186064,4T1BE46KX7U018210,,0,19FFFF,4T1BE46KX7U018210,1,14283,983901C0,799,36,18,,33792,0,0,0,,,38,,6,53557,0,0.0,0,219.5,-76.661456,39.832588,20160507132153,20160507132154,0230$")); + verifyPositions(decoder, text( "+RESP:GTFRI,360201,864251020186064,1G1JC5444R7252367,,12802,10,1,0,0.0,0,219.5,-76.661456,39.832588,20160507132235,,,,,,20460.9,00080:03:37,,,100,210000,791,,56,20160507132239,0233$")); |