From f86ea28c54cbb8e9e6f588ff053f4669e1a45f17 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Fri, 23 Oct 2020 14:23:49 -0700 Subject: Decode more flags --- src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java b/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java index bbafbd748..b9b156f93 100644 --- a/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java @@ -309,8 +309,10 @@ public class HuabaoProtocolDecoder extends BaseProtocolDecoder { position.set(Position.KEY_BATTERY, buf.readUnsignedShort() * 0.01); break; case 0xDA: - buf.readUnsignedShort(); + buf.readUnsignedShort(); // string cut count int deviceStatus = buf.readUnsignedByte(); + position.set("string", BitUtil.check(deviceStatus, 0)); + position.set(Position.KEY_MOTION, BitUtil.check(deviceStatus, 2)); position.set("cover", BitUtil.check(deviceStatus, 3)); break; case 0xEB: -- cgit v1.2.3