Browse Source

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.
master
Jason Short 13 years ago
parent
commit
8188058404
  1. 4
      ArduCopter/events.pde
  2. 2
      ArduCopter/motors.pde

4
ArduCopter/events.pde

@ -38,6 +38,10 @@ static void failsafe_on_event() @@ -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

2
ArduCopter/motors.pde

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

Loading…
Cancel
Save