1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-17 02:52:12 +01:00

OP-886 fixed a bug caused by wrong check for xSemaphoreTakeRecursive return code

Conflicts:
	flight/Libraries/alarms.c
This commit is contained in:
Alessio Morale 2013-04-20 15:24:12 +02:00
parent dd37c31a07
commit 8011a9476d

View File

@ -70,9 +70,7 @@ int32_t AlarmsSet(SystemAlarmsAlarmElem alarm, SystemAlarmsAlarmOptions severity
}
// Lock
if (xSemaphoreTakeRecursive(lock, portMAX_DELAY) != 0) {
return -1;
}
xSemaphoreTakeRecursive(lock, portMAX_DELAY);
// Read alarm and update its severity only if it was changed
SystemAlarmsGet(&alarms);
@ -108,9 +106,7 @@ int32_t ExtendedAlarmsSet(SystemAlarmsAlarmElem alarm,
}
// Lock
if (xSemaphoreTakeRecursive(lock, portMAX_DELAY) != 0) {
return -1;
}
xSemaphoreTakeRecursive(lock, portMAX_DELAY);
// Read alarm and update its severity only if it was changed
SystemAlarmsGet(&alarms);