aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol/KhdProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2021-02-28 16:40:39 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2021-02-28 16:40:39 -0800
commitb2f389803ffaed47082a6f770c5b19df98cecac2 (patch)
treedaa6023b153cc2e7625e0a884ea2ee4c524393e8 /src/main/java/org/traccar/protocol/KhdProtocolDecoder.java
parent166852601ab6b4f0e7917ae7c53a216ce3ffb054 (diff)
downloadtrackermap-server-b2f389803ffaed47082a6f770c5b19df98cecac2.tar.gz
trackermap-server-b2f389803ffaed47082a6f770c5b19df98cecac2.tar.bz2
trackermap-server-b2f389803ffaed47082a6f770c5b19df98cecac2.zip
Commands and result support
Diffstat (limited to 'src/main/java/org/traccar/protocol/KhdProtocolDecoder.java')
-rw-r--r--src/main/java/org/traccar/protocol/KhdProtocolDecoder.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/main/java/org/traccar/protocol/KhdProtocolDecoder.java b/src/main/java/org/traccar/protocol/KhdProtocolDecoder.java
index 16ad616ed..1f3798bd2 100644
--- a/src/main/java/org/traccar/protocol/KhdProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/KhdProtocolDecoder.java
@@ -125,11 +125,15 @@ public class KhdProtocolDecoder extends BaseProtocolDecoder {
position.set(Position.KEY_ODOMETER, buf.readUnsignedMedium());
position.set(Position.KEY_STATUS, buf.readUnsignedInt());
- position.set(Position.KEY_HDOP, buf.readUnsignedByte());
- position.set(Position.KEY_VDOP, buf.readUnsignedByte());
- position.set(Position.KEY_SATELLITES, buf.readUnsignedByte());
- buf.skipBytes(5); // other location data
+ buf.readUnsignedShort();
+ buf.readUnsignedByte();
+ buf.readUnsignedByte();
+ buf.readUnsignedByte();
+ buf.readUnsignedByte();
+ buf.readUnsignedByte();
+
+ position.set(Position.KEY_RESULT, buf.readUnsignedByte());
if (type == MSG_PERIPHERAL) {