fire a warning in case of wideband fault (#5109)

* fire a warning in case of wideband fault

* s
This commit is contained in:
Matthew Kennedy 2023-02-20 00:42:40 -08:00 committed by GitHub
parent 2049c4f2b6
commit eee53678bd
2 changed files with 7 additions and 0 deletions

View File

@ -1612,6 +1612,8 @@ typedef enum {
//P2793 Gear Shift Direction Circ
//P2794 Gear Shift Direction Circ Low
//P2795 Gear Shift Direction Circ High
Wideband_1_Fault = 2900,
Wideband_2_Fault = 2901,
//P2A00 O2 Sensor Circ Range/Perf Bank1 Sensor 1
//P2A01 O2 Sensor Circ Range/Perf Bank1 Sensor 2
//P2A02 O2 Sensor Circ Range/Perf Bank1 Sensor 3

View File

@ -111,6 +111,11 @@ void AemXSeriesWideband::decodeRusefiDiag(const CANRxFrame& frame) {
esr = data->Esr;
faultCode = static_cast<uint8_t>(data->Status);
if (data->Status != wbo::Fault::None) {
auto code = m_sensorIndex == 0 ? Wideband_1_Fault : Wideband_2_Fault;
warning(code, "Wideband #%d fault: %s", (m_sensorIndex + 1), wbo::describeFault(data->Status));
}
}
#endif