mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-31 16:52:10 +01:00
LP-327 - Raise an alarm to prevent arming if gyro is not yet calibrated (implement the same Revo behaviour)
This commit is contained in:
parent
f42c33a922
commit
c090b8df38
@ -356,7 +356,8 @@ static void AttitudeTask(__attribute__((unused)) void *parameters)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Only update attitude when sensor data is good
|
// Only update attitude when sensor data is good
|
||||||
if (retval != 0) {
|
// raise alarm if gyro has not been yet calibrated to prevent arming
|
||||||
|
if (retval != 0 || init == 0) {
|
||||||
AlarmsSet(SYSTEMALARMS_ALARM_ATTITUDE, SYSTEMALARMS_ALARM_ERROR);
|
AlarmsSet(SYSTEMALARMS_ALARM_ATTITUDE, SYSTEMALARMS_ALARM_ERROR);
|
||||||
} else {
|
} else {
|
||||||
// Do not update attitude data in simulation mode
|
// Do not update attitude data in simulation mode
|
||||||
|
Loading…
x
Reference in New Issue
Block a user