aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-02-27 09:29:58 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2016-02-27 09:29:58 +1300
commite586ffd374f7a66d1077d5a9cd1d6380655a23dc (patch)
tree1c4f536604219f3279109687ec60630a57a5b36b /src/org/traccar/protocol
parentd05bee19a973798554bf9b9f5563c5a8e5ba4d5e (diff)
downloadtraccar-server-e586ffd374f7a66d1077d5a9cd1d6380655a23dc.tar.gz
traccar-server-e586ffd374f7a66d1077d5a9cd1d6380655a23dc.tar.bz2
traccar-server-e586ffd374f7a66d1077d5a9cd1d6380655a23dc.zip
Support new GL200 message format
Diffstat (limited to 'src/org/traccar/protocol')
-rw-r--r--src/org/traccar/protocol/Gl200ProtocolDecoder.java4
1 files changed, 3 insertions, 1 deletions
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) {