mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +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:
parent
dd37c31a07
commit
8011a9476d
@ -70,9 +70,7 @@ int32_t AlarmsSet(SystemAlarmsAlarmElem alarm, SystemAlarmsAlarmOptions severity
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Lock
|
// Lock
|
||||||
if (xSemaphoreTakeRecursive(lock, portMAX_DELAY) != 0) {
|
xSemaphoreTakeRecursive(lock, portMAX_DELAY);
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Read alarm and update its severity only if it was changed
|
// Read alarm and update its severity only if it was changed
|
||||||
SystemAlarmsGet(&alarms);
|
SystemAlarmsGet(&alarms);
|
||||||
@ -108,9 +106,7 @@ int32_t ExtendedAlarmsSet(SystemAlarmsAlarmElem alarm,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Lock
|
// Lock
|
||||||
if (xSemaphoreTakeRecursive(lock, portMAX_DELAY) != 0) {
|
xSemaphoreTakeRecursive(lock, portMAX_DELAY);
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Read alarm and update its severity only if it was changed
|
// Read alarm and update its severity only if it was changed
|
||||||
SystemAlarmsGet(&alarms);
|
SystemAlarmsGet(&alarms);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user