diff --git a/firmware/controllers/core/le_functions.cpp b/firmware/controllers/core/le_functions.cpp index 3a5f837058..ca64c15ac2 100644 --- a/firmware/controllers/core/le_functions.cpp +++ b/firmware/controllers/core/le_functions.cpp @@ -9,6 +9,7 @@ #include "le_functions.h" #include "allsensors.h" #include "rpm_calculator.h" +#include "efiGpio.h" extern LENameOrdinalPair * LE_FIRST; @@ -30,8 +31,8 @@ static LENameOrdinalPair leTimeSinceBoot(LE_METHOD_TIME_SINCE_BOOT, "time_since_ float getLEValue(Engine *engine, le_action_e action) { efiAssert(engine!=NULL, "getLEValue", NAN); switch (action) { -// case LE_METHOD_FAN: - // return ; + case LE_METHOD_FAN: + return getOutputPinValue(FAN_RELAY); case LE_METHOD_COOLANT: return getCoolantTemperature(engine); case LE_METHOD_INTAKE_AIR: diff --git a/firmware/controllers/error_handling.c b/firmware/controllers/error_handling.c index 36b1ca581d..859ea9d543 100644 --- a/firmware/controllers/error_handling.c +++ b/firmware/controllers/error_handling.c @@ -88,7 +88,7 @@ char *getWarninig(void) { } uint64_t lastLockTime; -uint64_t maxLockTime = 0; +uint32_t maxLockTime = 0; void onLockHook(void) { lastLockTime = getTimeNowNt(); diff --git a/firmware/controllers/settings.cpp b/firmware/controllers/settings.cpp index ef9467af3d..bd61cfcd17 100644 --- a/firmware/controllers/settings.cpp +++ b/firmware/controllers/settings.cpp @@ -21,6 +21,7 @@ #include "trigger_decoder.h" #include "console_io.h" #include "engine.h" +#include "efiGpio.h" #if EFI_PROD_CODE #include "rusefi.h" @@ -332,6 +333,9 @@ static void printTemperatureInfo(void) { scheduleMsg(&logger, "IAT sensing error"); } + scheduleMsg(&logger, "fan=%s @ %s", boolToString(getOutputPinValue(FAN_RELAY)), + hwPortname(boardConfiguration->fanPin)); + #if EFI_ANALOG_INPUTS scheduleMsg(&logger, "base cranking fuel %f", engineConfiguration->crankingSettings.baseCrankingFuel); #endif diff --git a/firmware/controllers/trigger/trigger_central.cpp b/firmware/controllers/trigger/trigger_central.cpp index 54c80f4cb6..390c1539a9 100644 --- a/firmware/controllers/trigger/trigger_central.cpp +++ b/firmware/controllers/trigger/trigger_central.cpp @@ -199,6 +199,7 @@ static void triggerShapeInfo(Engine *engine) { #if EFI_PROD_CODE extern PwmConfig triggerSignal; +extern uint32_t maxLockTime; #endif /* #if EFI_PROD_CODE */ static void triggerInfo(Engine *engine) { @@ -228,10 +229,10 @@ static void triggerInfo(Engine *engine) { triggerCentral.triggerState.orderingErrorCounter, triggerCentral.triggerState.getTotalRevolutionCounter(), boolToString(engineConfiguration->directSelfStimulation)); - #endif #if EFI_PROD_CODE + scheduleMsg(&logger, "maxLockTime=%d", maxLockTime); scheduleMsg(&logger, "primary trigger simulator: %s %s freq=%d", hwPortname(boardConfiguration->triggerSimulatorPins[0]), pinModeToString(boardConfiguration->triggerSimulatorPinModes[0]),