aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar/protocol')
-rw-r--r--src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java b/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java
index 3c01c0468..871410c44 100644
--- a/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java
@@ -501,11 +501,15 @@ public class HuabaoProtocolDecoder extends BaseProtocolDecoder {
List<Position> positions = new LinkedList<>();
int count = buf.readUnsignedShort();
- buf.readUnsignedByte(); // location type
+ int locationType = buf.readUnsignedByte();
for (int i = 0; i < count; i++) {
int endIndex = buf.readUnsignedShort() + buf.readerIndex();
- positions.add(decodeLocation(deviceSession, buf));
+ Position position = decodeLocation(deviceSession, buf);
+ if (locationType == 0) {
+ position.set(Position.KEY_ARCHIVE, true);
+ }
+ positions.add(position);
buf.readerIndex(endIndex);
}