diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2014-06-01 12:35:22 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2014-06-01 12:35:22 +1200 |
commit | 688b34433c842b2f4ee546c9b8b19e867bfb4352 (patch) | |
tree | e7c0781571e67b8ca49042fa0247c1f99c43e08e | |
parent | 4d46aa335ad0f1985bf42d6a68904e2c594a50cf (diff) | |
parent | b52c3afd0d05f668592a252e41177f444f681e59 (diff) | |
download | traccar-server-688b34433c842b2f4ee546c9b8b19e867bfb4352.tar.gz traccar-server-688b34433c842b2f4ee546c9b8b19e867bfb4352.tar.bz2 traccar-server-688b34433c842b2f4ee546c9b8b19e867bfb4352.zip |
Merge pull request #735 from 31neKl31n3N4chtmu51k/adaptationForCarTrackClone
Adaptation for CarTrack clone
-rw-r--r-- | src/org/traccar/protocol/CarTrackProtocolDecoder.java | 2 | ||||
-rw-r--r-- | test/org/traccar/protocol/CarTrackProtocolDecoderTest.java | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/CarTrackProtocolDecoder.java b/src/org/traccar/protocol/CarTrackProtocolDecoder.java index 3ab026dd8..559a5ccc1 100644 --- a/src/org/traccar/protocol/CarTrackProtocolDecoder.java +++ b/src/org/traccar/protocol/CarTrackProtocolDecoder.java @@ -53,7 +53,7 @@ public class CarTrackProtocolDecoder extends BaseProtocolDecoder { "\\&C(.*)" + // IO Port Data "\\&D(.*)" + // Mile Meter Data "\\&E(.*)" + // Alarm Data - "\\&Y(.*)"); // AD Input Data + "(?:\\&Y)?(.*)"); // AD Input Data @Override protected Object decode( diff --git a/test/org/traccar/protocol/CarTrackProtocolDecoderTest.java b/test/org/traccar/protocol/CarTrackProtocolDecoderTest.java index f40b45e01..96a8e4b74 100644 --- a/test/org/traccar/protocol/CarTrackProtocolDecoderTest.java +++ b/test/org/traccar/protocol/CarTrackProtocolDecoderTest.java @@ -14,6 +14,10 @@ public class CarTrackProtocolDecoderTest { verify(decoder.decode(null, null, "$$2222234???????&A9955&B102904.000,A,2233.0655,N,11404.9440,E,0.00,,030109,,*17|6.3|&C0100000100&D000024?>&E10000000&Y00100020")); + + verify(decoder.decode(null, null, + "$$2222234???????&A9955&B102904.000,A,2233.0655,N,11404.9440,E,0.00,,030109,,*17|6.3|&C0100000100&D000024?>&E10000000")); + } |