diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2014-05-19 18:54:05 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2014-05-19 18:54:05 +1200 |
commit | e5549d271325639bae97dc3591ff09bf271cf43c (patch) | |
tree | fbf58a5de709d94eb0d9be350a9eee3377e178d9 | |
parent | 4d01f322be1c49f7a057bda6e9ce7e492b9b7311 (diff) | |
download | trackermap-server-e5549d271325639bae97dc3591ff09bf271cf43c.tar.gz trackermap-server-e5549d271325639bae97dc3591ff09bf271cf43c.tar.bz2 trackermap-server-e5549d271325639bae97dc3591ff09bf271cf43c.zip |
Support Single LED device
-rw-r--r-- | src/org/traccar/protocol/Tk103ProtocolDecoder.java | 4 | ||||
-rw-r--r-- | test/org/traccar/protocol/Tk103ProtocolDecoderTest.java | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/Tk103ProtocolDecoder.java b/src/org/traccar/protocol/Tk103ProtocolDecoder.java index fbcc702b8..200a1855c 100644 --- a/src/org/traccar/protocol/Tk103ProtocolDecoder.java +++ b/src/org/traccar/protocol/Tk103ProtocolDecoder.java @@ -45,8 +45,8 @@ public class Tk103ProtocolDecoder extends BaseProtocolDecoder { "([EW]),?" + "(\\d+\\.\\d)(?:\\d*,)?" + // Speed "(\\d{2})(\\d{2})(\\d{2}),?" + // Time (HHMMSS) - "(\\d+\\.?\\d+)" + // Course - "([0-9a-fA-F]{8})?" + // State + "(\\d+\\.?\\d+),?" + // Course + "([0-9a-fA-F]{8})?,?" + // State "(?:L([0-9a-fA-F]+))?"); // Milage @Override diff --git a/test/org/traccar/protocol/Tk103ProtocolDecoderTest.java b/test/org/traccar/protocol/Tk103ProtocolDecoderTest.java index d9c71c9b6..21066bdb2 100644 --- a/test/org/traccar/protocol/Tk103ProtocolDecoderTest.java +++ b/test/org/traccar/protocol/Tk103ProtocolDecoderTest.java @@ -47,6 +47,9 @@ public class Tk103ProtocolDecoderTest { verify(decoder.decode(null, null, "(352606090042050,BP05,240414,A,4527.3513N,00909.9758E,4.80,112825,155.49")); + + verify(decoder.decode(null, null, + "(013632782450,BP05,101201,A,2234.0297N,11405.9101E,000.0,040137,178.48,00000000,L00000000")); } |