From 85f7eae47ec4bf6b269305a05a696f9acce31fd5 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 11 Jul 2017 05:09:25 +1200 Subject: Support Gelileo command response --- src/org/traccar/protocol/GalileoProtocolDecoder.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/org/traccar') diff --git a/src/org/traccar/protocol/GalileoProtocolDecoder.java b/src/org/traccar/protocol/GalileoProtocolDecoder.java index 0e8163f8c..3944b37de 100644 --- a/src/org/traccar/protocol/GalileoProtocolDecoder.java +++ b/src/org/traccar/protocol/GalileoProtocolDecoder.java @@ -208,6 +208,13 @@ public class GalileoProtocolDecoder extends BaseProtocolDecoder { case 0xd4: position.set(Position.KEY_ODOMETER, buf.readUnsignedInt()); break; + case 0xe0: + position.set(Position.KEY_INDEX, buf.readUnsignedInt()); + break; + case 0xe1: + position.set(Position.KEY_RESULT, + buf.readBytes(buf.readUnsignedByte()).toString(StandardCharsets.US_ASCII)); + break; case 0xe2: case 0xe3: case 0xe4: @@ -273,6 +280,9 @@ public class GalileoProtocolDecoder extends BaseProtocolDecoder { if (hasLocation && position.getFixTime() != null) { positions.add(position); + } else if (position.getAttributes().containsKey(Position.KEY_RESULT)) { + getLastLocation(position, null); + positions.add(position); } if (deviceSession == null) { -- cgit v1.2.3