From b849e90fb7212d4499e05546934e23f582af346d Mon Sep 17 00:00:00 2001 From: Stanley Huang Date: Sat, 28 Jun 2014 13:52:24 +1000 Subject: Define more OBD-II PIDs --- libraries/OBD/OBD.cpp | 6 ++++++ libraries/OBD/OBD.h | 4 ++++ 2 files changed, 10 insertions(+) (limited to 'libraries') diff --git a/libraries/OBD/OBD.cpp b/libraries/OBD/OBD.cpp index 2728a09..85e3ed0 100644 --- a/libraries/OBD/OBD.cpp +++ b/libraries/OBD/OBD.cpp @@ -168,6 +168,12 @@ int COBD::normalizeData(byte pid, char* data) case PID_FUEL_INJECTION_TIMING: result = ((int32_t)getLargeValue(data) - 26880) / 128; break; + case PID_CATALYST_TEMP_B1S1: + case PID_CATALYST_TEMP_B2S1: + case PID_CATALYST_TEMP_B1S2: + case PID_CATALYST_TEMP_B2S2: + result = getLargeValue(data) / 10 - 40; + break; default: result = getSmallValue(data); } diff --git a/libraries/OBD/OBD.h b/libraries/OBD/OBD.h index ebc86b1..d2a9eb1 100644 --- a/libraries/OBD/OBD.h +++ b/libraries/OBD/OBD.h @@ -49,6 +49,10 @@ #define PID_DISTANCE 0x31 #define PID_EVAP_SYS_VAPOR_PRESSURE 0x32 #define PID_BAROMETRIC 0x33 +#define PID_CATALYST_TEMP_B1S1 0x3C +#define PID_CATALYST_TEMP_B2S1 0x3D +#define PID_CATALYST_TEMP_B1S2 0x3E +#define PID_CATALYST_TEMP_B2S2 0x3F #define PID_CONTROL_MODULE_VOLTAGE 0x42 #define PID_ABSOLUTE_ENGINE_LOAD 0x43 #define PID_RELATIVE_THROTTLE_POS 0x45 -- cgit v1.2.3