aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2023-05-09 08:16:00 -0700
committerAnton Tananaev <anton@traccar.org>2023-05-09 08:16:00 -0700
commite2402983eb53f6cd384cdd09cc0d217772023b9a (patch)
treea2a82be01585d0603cc7838fead8e11ed0ab4afa /src/main
parent1e8c232e37d0f041a8518cb4790322965bdd6fd5 (diff)
downloadtrackermap-server-e2402983eb53f6cd384cdd09cc0d217772023b9a.tar.gz
trackermap-server-e2402983eb53f6cd384cdd09cc0d217772023b9a.tar.bz2
trackermap-server-e2402983eb53f6cd384cdd09cc0d217772023b9a.zip
Expand transparent data
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java b/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java
index 1aebba4e6..f0b7cf6ca 100644
--- a/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java
@@ -877,6 +877,22 @@ public class HuabaoProtocolDecoder extends BaseProtocolDecoder {
case 0x0539:
position.set(Position.KEY_FUEL_CONSUMPTION, buf.readUnsignedShort() * 0.01);
break;
+ case 0x052D:
+ position.set(Position.KEY_COOLANT_TEMP, buf.readUnsignedByte() - 40);
+ break;
+ case 0x0530:
+ position.set(Position.KEY_POWER, buf.readUnsignedShort() * 0.001);
+ break;
+ case 0x0535:
+ position.set(Position.KEY_OBD_SPEED, buf.readUnsignedShort() * 0.1);
+ break;
+ case 0x0536:
+ position.set(Position.KEY_RPM, buf.readUnsignedShort());
+ break;
+ case 0x0547:
+ case 0x0548:
+ position.set(Position.KEY_THROTTLE, buf.readUnsignedByte());
+ break;
default:
switch (length) {
case 1:
@@ -898,6 +914,17 @@ public class HuabaoProtocolDecoder extends BaseProtocolDecoder {
decodeCoordinates(position, buf);
position.setTime(time);
break;
+ case 0x02:
+ count = buf.readUnsignedByte();
+ for (int i = 0; i < count; i++) {
+ buf.readUnsignedInt(); // system id
+ int codeCount = buf.readUnsignedShort();
+ for (int j = 0; j < codeCount; j++) {
+ buf.skipBytes(16); // code
+ }
+ }
+ decodeCoordinates(position, buf);
+ break;
case 0x03:
count = buf.readUnsignedByte();
for (int i = 0; i < count; i++) {