diff options
author | Stanley Huang <stanleyhuangyc@gmail.com> | 2014-06-28 13:52:24 +1000 |
---|---|---|
committer | Stanley Huang <stanleyhuangyc@gmail.com> | 2014-06-28 13:52:24 +1000 |
commit | b849e90fb7212d4499e05546934e23f582af346d (patch) | |
tree | 120f11527c4927dede74472400912561040c8c61 | |
parent | 82f6938f17b3afb13e0403c87f3fdef4e2ff180f (diff) | |
download | 2021-arduino-obd-b849e90fb7212d4499e05546934e23f582af346d.tar.gz 2021-arduino-obd-b849e90fb7212d4499e05546934e23f582af346d.tar.bz2 2021-arduino-obd-b849e90fb7212d4499e05546934e23f582af346d.zip |
Define more OBD-II PIDs
-rw-r--r-- | libraries/OBD/OBD.cpp | 6 | ||||
-rw-r--r-- | libraries/OBD/OBD.h | 4 |
2 files changed, 10 insertions, 0 deletions
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
|