From dda1b90701c003d568e87eb223b406c2403b5da6 Mon Sep 17 00:00:00 2001 From: rusefillc Date: Tue, 11 Apr 2023 14:54:23 -0400 Subject: [PATCH] Indicator for injector HW issues #5189 only:mre_f4 --- firmware/controllers/sensors/sensor_checker.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/firmware/controllers/sensors/sensor_checker.cpp b/firmware/controllers/sensors/sensor_checker.cpp index a41c1d1822..3eab1883b3 100644 --- a/firmware/controllers/sensors/sensor_checker.cpp +++ b/firmware/controllers/sensors/sensor_checker.cpp @@ -175,6 +175,7 @@ void SensorChecker::onSlowCallback() { // only bother checking these if we have GPIO chips actually capable of reporting an error #if BOARD_EXT_GPIOCHIPS > 0 && EFI_PROD_CODE // Check injectors + bool withInjectorIssues = false; for (size_t i = 0; i < efi::size(enginePins.injectors); i++) { InjectorOutputPin& pin = enginePins.injectors[i]; @@ -185,6 +186,7 @@ void SensorChecker::onSlowCallback() { auto diag = pin.getDiag(); if (diag != PIN_OK && diag != PIN_INVALID) { + withInjectorIssues = true; auto code = getCodeForInjector(i + 1, diag); char description[32]; @@ -192,6 +194,7 @@ void SensorChecker::onSlowCallback() { warning(code, "Injector %d fault: %s", i, description); } } + engine->fuelComputer.injectorHwIssue = withInjectorIssues; // Check ignition for (size_t i = 0; i < efi::size(enginePins.injectors); i++) {