aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2021-08-11 19:49:42 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2021-08-11 19:49:42 -0700
commitea39e1d4c8ba7fe8e2a017ec064b3bcb90f2e1d8 (patch)
treecca51b5a37215095e4a2cf17c4b50f90ee533f21
parent6ced867cad974c3b75b9ade45ba8bda038e6155e (diff)
downloadtraccar-server-ea39e1d4c8ba7fe8e2a017ec064b3bcb90f2e1d8.tar.gz
traccar-server-ea39e1d4c8ba7fe8e2a017ec064b3bcb90f2e1d8.tar.bz2
traccar-server-ea39e1d4c8ba7fe8e2a017ec064b3bcb90f2e1d8.zip
Additional OBD parameters
-rw-r--r--src/main/java/org/traccar/protocol/PacificTrackProtocolDecoder.java15
-rw-r--r--src/test/java/org/traccar/protocol/PacificTrackProtocolDecoderTest.java3
2 files changed, 18 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/protocol/PacificTrackProtocolDecoder.java b/src/main/java/org/traccar/protocol/PacificTrackProtocolDecoder.java
index c9044fa2b..b5d34a029 100644
--- a/src/main/java/org/traccar/protocol/PacificTrackProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/PacificTrackProtocolDecoder.java
@@ -138,6 +138,21 @@ public class PacificTrackProtocolDecoder extends BaseProtocolDecoder {
case 0b01011:
position.set("barometer", buf.readUnsignedByte() * 0.5);
break;
+ case 0b01100:
+ position.set("intakeManifoldTemp", buf.readUnsignedByte() - 40);
+ break;
+ case 0b01101:
+ position.set("fuelTankTemp", buf.readUnsignedByte() - 40);
+ break;
+ case 0b01110:
+ position.set("intercoolerTemp", buf.readUnsignedByte() - 40);
+ break;
+ case 0b01111:
+ position.set("turboOilTemp", buf.readUnsignedByte() - 40);
+ break;
+ case 0b10000:
+ position.set("transOilTemp", buf.readUnsignedByte() - 40);
+ break;
default:
buf.readUnsignedByte();
break;
diff --git a/src/test/java/org/traccar/protocol/PacificTrackProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/PacificTrackProtocolDecoderTest.java
index e170bc98e..edf508314 100644
--- a/src/test/java/org/traccar/protocol/PacificTrackProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/PacificTrackProtocolDecoderTest.java
@@ -25,6 +25,9 @@ public class PacificTrackProtocolDecoderTest extends ProtocolTest {
var decoder = new PacificTrackProtocolDecoder(null);
verifyAttributes(decoder, binary(
+ "FB80019702808835275309000091108181B2C08F0143000E10000000010000001400010192DF0143288063810A8202835584D285B486E68780882D89C38A788BCE8C3A8D3C8E418F809073A008ACA16600A225A0C0000F4240C10003DF2CC200004E20C3004428C0C4000008C6C5000316A4E011314334424A57464758444C35333137373302A086AB569DFE110E02A8811203FF81000190820100"));
+
+ verifyAttributes(decoder, binary(
"fb80c88181b00280883592151012618820b18b1f123340f004c90001300301928a0080008100c00000000091971c0b0417020d074df0ec03c242550b20081d0c009a0601a1855571a30000"));
verifyAttributes(decoder, binary(