Skip to content
Snippets Groups Projects
Commit 34945b4e authored by Jason Short's avatar Jason Short
Browse files

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.
parent 7dd58227
No related branches found
No related tags found
No related merge requests found
...@@ -38,6 +38,10 @@ static void failsafe_on_event() ...@@ -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() ...@@ -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;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment