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
|
||||
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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user