aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-12-19 05:49:00 -0800
committerAnton Tananaev <anton@traccar.org>2022-12-19 05:49:00 -0800
commit82a6fc308efde0e274b143dd2f5261c30774c3fe (patch)
tree8d16d99c470c90c62f06a50e1bf37a6fe0435783 /src/main/java/org
parentddf72b364323ed3f787fd41c5d5126c3521b96b7 (diff)
downloadtrackermap-server-82a6fc308efde0e274b143dd2f5261c30774c3fe.tar.gz
trackermap-server-82a6fc308efde0e274b143dd2f5261c30774c3fe.tar.bz2
trackermap-server-82a6fc308efde0e274b143dd2f5261c30774c3fe.zip
Support JXYD JX08 data
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java b/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java
index cb747fc2e..60477af8f 100644
--- a/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java
@@ -455,6 +455,9 @@ public class HuabaoProtocolDecoder extends BaseProtocolDecoder {
case 0x02:
position.set(Position.KEY_FUEL_LEVEL, buf.readUnsignedShort() * 0.1);
break;
+ case 0x2b:
+ position.set(Position.KEY_FUEL_CONSUMPTION, buf.readUnsignedInt());
+ break;
case 0x30:
position.set(Position.KEY_RSSI, buf.readUnsignedByte());
break;
@@ -588,6 +591,9 @@ public class HuabaoProtocolDecoder extends BaseProtocolDecoder {
position.set(Position.KEY_BATTERY, buf.readUnsignedShort() * 0.001);
position.set(Position.KEY_SATELLITES, buf.readUnsignedByte());
break;
+ case 0xF3:
+ position.set(Position.KEY_ARMED, buf.readUnsignedByte() > 0);
+ break;
case 0xFE:
if (length == 1) {
position.set(Position.KEY_BATTERY_LEVEL, buf.readUnsignedByte());
@@ -626,6 +632,7 @@ public class HuabaoProtocolDecoder extends BaseProtocolDecoder {
}
break;
default:
+ System.out.println("subtype " + String.format("%x", subtype));
break;
}
buf.readerIndex(endIndex);