OBD CAN sensors #1733

This commit is contained in:
rusefi 2020-08-31 22:00:03 -04:00
parent 77ddb49d91
commit db9ea3b3e3
2 changed files with 2 additions and 1 deletions

View File

@ -193,7 +193,7 @@ void obdOnCanPacketRx(const CANRxFrame& rx) {
return;
}
if (rx.data8[0] == 2 && rx.data8[1] == OBD_CURRENT_DATA) {
if (rx.data8[0] == _OBD_2 && rx.data8[1] == OBD_CURRENT_DATA) {
handleGetDataRequest(rx);
} else if (rx.data8[0] == 1 && rx.data8[1] == OBD_STORED_DIAGNOSTIC_TROUBLE_CODES) {
// todo: implement stored/pending difference?

View File

@ -14,6 +14,7 @@
#define OBD_TEST_RESPONSE 0x7E8
#define OBD_CURRENT_DATA 1
#define _OBD_2 2
#define OBD_STORED_DIAGNOSTIC_TROUBLE_CODES 3
#define OBD_PENDING_DIAGNOSTIC_TROUBLE_CODES 7