mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-28 09:58:23 +08:00
[rotorcraft] don't force failsafe commands if motors are off
This commit is contained in:
@@ -93,11 +93,14 @@ void autopilot_periodic(void) {
|
|||||||
autopilot_detect_ground = FALSE;
|
autopilot_detect_ground = FALSE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if ( !autopilot_motors_on ||
|
|
||||||
|
/* set failsafe commands, if in FAILSAFE or KILL mode */
|
||||||
#ifndef FAILSAFE_GROUND_DETECT
|
#ifndef FAILSAFE_GROUND_DETECT
|
||||||
autopilot_mode == AP_MODE_FAILSAFE ||
|
if (autopilot_mode == AP_MODE_KILL ||
|
||||||
|
autopilot_mode == AP_MODE_FAILSAFE) {
|
||||||
|
#else
|
||||||
|
if (autopilot_mode == AP_MODE_KILL) {
|
||||||
#endif
|
#endif
|
||||||
autopilot_mode == AP_MODE_KILL ) {
|
|
||||||
SetCommands(commands_failsafe,
|
SetCommands(commands_failsafe,
|
||||||
autopilot_in_flight, autopilot_motors_on);
|
autopilot_in_flight, autopilot_motors_on);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user