From e586ffd374f7a66d1077d5a9cd1d6380655a23dc Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 27 Feb 2016 09:29:58 +1300 Subject: Support new GL200 message format --- src/org/traccar/protocol/Gl200ProtocolDecoder.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/org') diff --git a/src/org/traccar/protocol/Gl200ProtocolDecoder.java b/src/org/traccar/protocol/Gl200ProtocolDecoder.java index 6902e61dd..71ccbd026 100644 --- a/src/org/traccar/protocol/Gl200ProtocolDecoder.java +++ b/src/org/traccar/protocol/Gl200ProtocolDecoder.java @@ -93,7 +93,7 @@ public class Gl200ProtocolDecoder extends BaseProtocolDecoder { .number("(d+)?,") // lac .number("(d+)?,") // cell .groupEnd() - .number("d*,") // reserved + .number("(?:d+|(d+.d))?,") // odometer .compile(); private static final Pattern PATTERN_OBD = new PatternBuilder() @@ -265,6 +265,8 @@ public class Gl200ProtocolDecoder extends BaseProtocolDecoder { } parser.skip(4); // alternative networks + + position.set(Event.KEY_ODOMETER, parser.next()); } private Object decodeObd(Channel channel, SocketAddress remoteAddress, String sentence) { -- cgit v1.2.3