From 9e75f24dc7ddeac4a7059829cd0c24a4f43e988f Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sun, 19 Jul 2015 12:30:54 +1200 Subject: Implement GT06 mileage parsing (fix #1308) --- src/org/traccar/protocol/Gt06ProtocolDecoder.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/org') diff --git a/src/org/traccar/protocol/Gt06ProtocolDecoder.java b/src/org/traccar/protocol/Gt06ProtocolDecoder.java index 3bbe87e36..07f6dc7d5 100644 --- a/src/org/traccar/protocol/Gt06ProtocolDecoder.java +++ b/src/org/traccar/protocol/Gt06ProtocolDecoder.java @@ -1,5 +1,5 @@ /* - * Copyright 2012 - 2014 Anton Tananaev (anton.tananaev@gmail.com) + * Copyright 2012 - 2015 Anton Tananaev (anton.tananaev@gmail.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -216,6 +216,10 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder { position.set(Event.KEY_GSM, buf.readUnsignedByte()); } } + + if (type == MSG_GPS_LBS_1 && buf.readableBytes() == 4 + 6) { + position.set(Event.KEY_ODOMETER, buf.readUnsignedInt()); + } // Index if (buf.readableBytes() > 6) { -- cgit v1.2.3