diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2012-08-04 17:11:59 +0400 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2012-08-04 17:11:59 +0400 |
commit | 9784127324bee141e8f3740a156a6fd24bd0273b (patch) | |
tree | 9a5d98ae48fd2b58e82b07b29b26ea5894f43320 | |
parent | 4180461322830a37496c184511c6171a6a1609fe (diff) | |
download | traccar-server-9784127324bee141e8f3740a156a6fd24bd0273b.tar.gz traccar-server-9784127324bee141e8f3740a156a6fd24bd0273b.tar.bz2 traccar-server-9784127324bee141e8f3740a156a6fd24bd0273b.zip |
Change pattern (fix #34)
-rw-r--r-- | src/org/traccar/protocol/Gps103ProtocolDecoder.java | 2 | ||||
-rw-r--r-- | test/org/traccar/protocol/Gps103ProtocolDecoderTest.java | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/Gps103ProtocolDecoder.java b/src/org/traccar/protocol/Gps103ProtocolDecoder.java index 714a80e49..88a83ef80 100644 --- a/src/org/traccar/protocol/Gps103ProtocolDecoder.java +++ b/src/org/traccar/protocol/Gps103ProtocolDecoder.java @@ -45,7 +45,7 @@ public class Gps103ProtocolDecoder extends GenericProtocolDecoder { "([\\d]+)," + // IMEI "[^,]+," + "(\\d{2})(\\d{2})(\\d{2})[\\d]+," + // Date - "[+]?[\\d]*," + + "[^,]*," + "[FL]," + // F - full / L - low "([\\d]{2})([\\d]{2})([\\d]{2}).([\\d]{3})," + // Time (HHMMSS.SSS) "([AV])," + // Validity diff --git a/test/org/traccar/protocol/Gps103ProtocolDecoderTest.java b/test/org/traccar/protocol/Gps103ProtocolDecoderTest.java index c09b34bc7..7a90e4fbd 100644 --- a/test/org/traccar/protocol/Gps103ProtocolDecoderTest.java +++ b/test/org/traccar/protocol/Gps103ProtocolDecoderTest.java @@ -23,6 +23,9 @@ public class Gps103ProtocolDecoderTest { assertNotNull(decoder.decode(null, null, "imei:359587010124900,tracker,0809231929,13554900601,F,112909.397,A,2234.4669,N,11354.3287,E,0.11,321.53,")); + + assertNotNull(decoder.decode(null, null, + "imei:353451049926460,tracker,1208042043,123456 99008026,F,124336.000,A,3509.8668,N,03322.7636,E,0.00,,")); } |