From ea39e1d4c8ba7fe8e2a017ec064b3bcb90f2e1d8 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Wed, 11 Aug 2021 19:49:42 -0700 Subject: Additional OBD parameters --- .../org/traccar/protocol/PacificTrackProtocolDecoder.java | 15 +++++++++++++++ .../traccar/protocol/PacificTrackProtocolDecoderTest.java | 3 +++ 2 files changed, 18 insertions(+) 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 @@ -24,6 +24,9 @@ public class PacificTrackProtocolDecoderTest extends ProtocolTest { var decoder = new PacificTrackProtocolDecoder(null); + verifyAttributes(decoder, binary( + "FB80019702808835275309000091108181B2C08F0143000E10000000010000001400010192DF0143288063810A8202835584D285B486E68780882D89C38A788BCE8C3A8D3C8E418F809073A008ACA16600A225A0C0000F4240C10003DF2CC200004E20C3004428C0C4000008C6C5000316A4E011314334424A57464758444C35333137373302A086AB569DFE110E02A8811203FF81000190820100")); + verifyAttributes(decoder, binary( "fb80c88181b00280883592151012618820b18b1f123340f004c90001300301928a0080008100c00000000091971c0b0417020d074df0ec03c242550b20081d0c009a0601a1855571a30000")); -- cgit v1.2.3