set safe state if system fault detected
This commit is contained in:
		| @ -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) | ||||
|  | ||||
		Reference in New Issue
	
	Block a user