diff options
-rw-r--r-- | src/org/traccar/protocol/Tk103ProtocolDecoder.java | 2 | ||||
-rw-r--r-- | test/org/traccar/protocol/Tk103ProtocolDecoderTest.java | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/Tk103ProtocolDecoder.java b/src/org/traccar/protocol/Tk103ProtocolDecoder.java index fd208d526..2bcd62407 100644 --- a/src/org/traccar/protocol/Tk103ProtocolDecoder.java +++ b/src/org/traccar/protocol/Tk103ProtocolDecoder.java @@ -54,7 +54,7 @@ public class Tk103ProtocolDecoder extends BaseProtocolDecoder { .expression("([EW]),?") .number("(d+.d)(?:d*,)?") // speed .number("(dd)(dd)(dd),?") // time (hhmmss) - .number("(d+.?d{1,2}),?") // course + .number("(d+.?d{1,4}),?") // course .groupBegin() .number("([01])") // charge .number("([01])") // ignition diff --git a/test/org/traccar/protocol/Tk103ProtocolDecoderTest.java b/test/org/traccar/protocol/Tk103ProtocolDecoderTest.java index c02da7ac2..4b4097600 100644 --- a/test/org/traccar/protocol/Tk103ProtocolDecoderTest.java +++ b/test/org/traccar/protocol/Tk103ProtocolDecoderTest.java @@ -11,6 +11,9 @@ public class Tk103ProtocolDecoderTest extends ProtocolTest { Tk103ProtocolDecoder decoder = new Tk103ProtocolDecoder(new Tk103Protocol()); verifyPosition(decoder, text( + "(019358704260BR00180725A2300.0957N07235.2748E032.412092187.58001100166L000D9779)")); + + verifyPosition(decoder, text( "(358511020000026,DW5B,310,6,29876,30393,0,041217,102211)")); verifyPosition(decoder, text( |