mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-11 10:28:29 -04:00
ACM: Failsafe Fix for Mission planner initiated AUTO mode
Keeps the failsafe from exiting Auto mode when returning from failsafe. Added arming ability for Toy mode.
This commit is contained in:
parent
39ad8b5eec
commit
8188058404
@ -38,6 +38,10 @@ static void failsafe_on_event()
|
|||||||
|
|
||||||
static void failsafe_off_event()
|
static void failsafe_off_event()
|
||||||
{
|
{
|
||||||
|
// If we are in AUTO, no need to do anything
|
||||||
|
if(control_mode == AUTO)
|
||||||
|
return;
|
||||||
|
|
||||||
if (g.throttle_fs_action == 2){
|
if (g.throttle_fs_action == 2){
|
||||||
// We're back in radio contact
|
// We're back in radio contact
|
||||||
// return to AP
|
// return to AP
|
||||||
|
@ -12,7 +12,7 @@ static void arm_motors()
|
|||||||
static int arming_counter;
|
static int arming_counter;
|
||||||
|
|
||||||
// don't allow arming/disarming in anything but manual
|
// don't allow arming/disarming in anything but manual
|
||||||
if ((g.rc_3.control_in > 0) || (control_mode >= ALT_HOLD) || (arming_counter > LEVEL_DELAY)){
|
if ((g.rc_3.control_in > 0) || (control_mode >= ALT_HOLD) || (control_mode == TOY) || (arming_counter > LEVEL_DELAY)){
|
||||||
arming_counter = 0;
|
arming_counter = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user