improve fault handling

This commit is contained in:
2024-12-25 18:09:04 +01:00
parent 2717f4a8e6
commit c50f36d8a9
3 changed files with 19 additions and 13 deletions

View File

@ -155,16 +155,5 @@ void getSensorSanityStates(sSensorSanityCheck *pSensorSanityChecks)
eSafetyState getSafetyState(void)
{
eSafetyState state = SAFETY_NO_ERROR;
if (xSemaphoreTakeRecursive(xMutexAccessSafety, pdMS_TO_TICKS(5000)) == pdTRUE)
{
state = sSafetyState;
xSemaphoreGiveRecursive(xMutexAccessSafety);
}
else
{
state = SAFETY_INTERNAL_ERROR;
ESP_LOGE(TAG, "Unable to take mutex: getSafetyState()");
}
return state;
return sSafetyState;
}