aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2023-05-10 07:33:05 -0700
committerAnton Tananaev <anton@traccar.org>2023-05-10 07:33:05 -0700
commitae1205dfdded530e4cdf7bb665fe52cf197c33be (patch)
treeb151309a7540c193bba8661a7a4af76cb95d69f4 /src/main/java/org/traccar
parentd797671b2ce6fb70ac868bb96f87be8b2a85e4f9 (diff)
downloadtrackermap-server-ae1205dfdded530e4cdf7bb665fe52cf197c33be.tar.gz
trackermap-server-ae1205dfdded530e4cdf7bb665fe52cf197c33be.tar.bz2
trackermap-server-ae1205dfdded530e4cdf7bb665fe52cf197c33be.zip
Fix Huabao event decoding
Diffstat (limited to 'src/main/java/org/traccar')
-rw-r--r--src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java b/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java
index 05e2fb8cc..ed71861a5 100644
--- a/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java
@@ -333,10 +333,6 @@ public class HuabaoProtocolDecoder extends BaseProtocolDecoder {
buf.readUnsignedByte(); // power level
position.set(Position.KEY_BATTERY_LEVEL, buf.readUnsignedByte());
break;
- case 0x60:
- position.set(Position.KEY_EVENT, buf.readUnsignedShort());
- buf.skipBytes(length - 2);
- break;
case 0x61:
position.set(Position.KEY_POWER, buf.readUnsignedShort() * 0.01);
break;
@@ -488,6 +484,10 @@ public class HuabaoProtocolDecoder extends BaseProtocolDecoder {
position.set(Position.KEY_BATTERY, Integer.parseInt(lockStatus.substring(2, 5)) * 0.01);
}
break;
+ case 0x60:
+ position.set(Position.KEY_EVENT, buf.readUnsignedShort());
+ buf.skipBytes(length - 2);
+ break;
case 0x80:
buf.readUnsignedByte(); // content
endIndex = buf.writerIndex() - 2;