diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2020-10-23 14:23:49 -0700 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2020-10-23 14:23:49 -0700 |
commit | f86ea28c54cbb8e9e6f588ff053f4669e1a45f17 (patch) | |
tree | 818ab9ada1085f314a8023203e705699538a58fe /src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java | |
parent | c686a4f045f15944940e131ccfb2fa6a1e0a5e7c (diff) | |
download | trackermap-server-f86ea28c54cbb8e9e6f588ff053f4669e1a45f17.tar.gz trackermap-server-f86ea28c54cbb8e9e6f588ff053f4669e1a45f17.tar.bz2 trackermap-server-f86ea28c54cbb8e9e6f588ff053f4669e1a45f17.zip |
Decode more flags
Diffstat (limited to 'src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java')
-rw-r--r-- | src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java | 4 |
1 files changed, 3 insertions, 1 deletions
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: |