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:
Jason Short 2012-07-23 19:34:14 -07:00
parent 39ad8b5eec
commit 8188058404
2 changed files with 5 additions and 1 deletions

View File

@ -38,6 +38,10 @@ static void failsafe_on_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){
// We're back in radio contact
// return to AP

View File

@ -12,7 +12,7 @@ static void arm_motors()
static int arming_counter;
// 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;
return;
}