aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/traccar/protocol/HuaShengProtocolDecoder.java7
-rw-r--r--src/test/java/org/traccar/protocol/HuaShengProtocolDecoderTest.java3
2 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/protocol/HuaShengProtocolDecoder.java b/src/main/java/org/traccar/protocol/HuaShengProtocolDecoder.java
index 2e1ddf5f2..891046213 100644
--- a/src/main/java/org/traccar/protocol/HuaShengProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/HuaShengProtocolDecoder.java
@@ -262,6 +262,13 @@ public class HuaShengProtocolDecoder extends BaseProtocolDecoder {
case 0x0011:
position.set(Position.KEY_HOURS, buf.readUnsignedInt() * 0.05);
break;
+ case 0x0014:
+ position.set(Position.KEY_ENGINE_LOAD, buf.readUnsignedByte() / 255.0);
+ position.set("timingAdvance", buf.readUnsignedByte() * 0.5);
+ position.set("airTemp", buf.readUnsignedByte() - 40);
+ position.set("airFlow", buf.readUnsignedShort() * 0.01);
+ position.set(Position.KEY_THROTTLE, buf.readUnsignedByte() / 255.0);
+ break;
case 0x0020:
String[] cells = buf.readCharSequence(
length, StandardCharsets.US_ASCII).toString().split("\\+");
diff --git a/src/test/java/org/traccar/protocol/HuaShengProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/HuaShengProtocolDecoderTest.java
index 51a5d18ae..74671b845 100644
--- a/src/test/java/org/traccar/protocol/HuaShengProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/HuaShengProtocolDecoderTest.java
@@ -12,6 +12,9 @@ public class HuaShengProtocolDecoderTest extends ProtocolTest {
var decoder = new HuaShengProtocolDecoder(null);
verifyNull(decoder, binary(
+ "c00000007eaa000000000000cb8000000032313130313030393238323800e9abafffd615d2000000000008000000010015ffffff0000000000000004e7ffffffffff0005000a10080001d5ab000900154b4e4142323531324d4b54353638363630000f00133335343434343131353130333138380014000b00000000000000c0"));
+
+ verifyNull(decoder, binary(
"c0010c003c0002000000000044020010a0014f42445f3347315f56322e320013a0043335353835353035313032303536360006a08700000006a0a105c9c0"));
verifyNull(decoder, binary(