aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol/KhdProtocolDecoder.java
diff options
context:
space:
mode:
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) {