set safe state if system fault detected

This commit is contained in:
Hendrik Schutter 2024-12-13 22:45:03 +01:00
parent 357608b30a
commit 1dbab68f1d

View File

@ -58,6 +58,12 @@ void taskSafety(void *pvParameters)
{
checkSensorSanity();
if (sSafetyState != SAFETY_NO_ERROR)
{
setSafeState();
}
xSemaphoreGiveRecursive(xMutexAccessSafety);
}
}
@ -122,8 +128,8 @@ void checkSensorSanity(void)
void setSafeState(void)
{
setCirculationPumpState(DISABLED);
setBurnerState(DISABLED);
setCirculationPumpState(ENABLED); // To cool down system
setBurnerState(DISABLED); // Deactivate burner
}
void getSensorSanityStates(sSensorSanityCheck *pSensorSanityChecks)