aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-07-11 05:09:25 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2017-07-11 05:09:25 +1200
commit85f7eae47ec4bf6b269305a05a696f9acce31fd5 (patch)
tree2140777c5561512413d2482909dc607ee554e203 /src/org
parent96b48f5cb2bf214059de2875194634b0801fcc94 (diff)
downloadtrackermap-server-85f7eae47ec4bf6b269305a05a696f9acce31fd5.tar.gz
trackermap-server-85f7eae47ec4bf6b269305a05a696f9acce31fd5.tar.bz2
trackermap-server-85f7eae47ec4bf6b269305a05a696f9acce31fd5.zip
Support Gelileo command response
Diffstat (limited to 'src/org')
-rw-r--r--src/org/traccar/protocol/GalileoProtocolDecoder.java10
1 files changed, 10 insertions, 0 deletions
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) {