Browse Source

Copter: make bailout only enabled with AROT_ENABLE

gps-1.3.1
Bill Geyer 3 years ago committed by Bill Geyer
parent
commit
40d75302c2
  1. 6
      ArduCopter/heli.cpp

6
ArduCopter/heli.cpp

@ -207,8 +207,8 @@ void Copter::heli_update_autorotation()
{ {
#if MODE_AUTOROTATE_ENABLED == ENABLED #if MODE_AUTOROTATE_ENABLED == ENABLED
// check if flying and interlock disengaged // check if flying and interlock disengaged
if (!ap.land_complete && !motors->get_interlock()) { if (!ap.land_complete && !motors->get_interlock() && g2.arot.is_enable()) {
if (!flightmode->has_manual_throttle() && g2.arot.is_enable()) { if (!flightmode->has_manual_throttle()) {
// set autonomous autorotation flight mode // set autonomous autorotation flight mode
set_mode(Mode::Number::AUTOROTATE, ModeReason::AUTOROTATION_START); set_mode(Mode::Number::AUTOROTATE, ModeReason::AUTOROTATION_START);
} }
@ -220,7 +220,7 @@ void Copter::heli_update_autorotation()
// sets autorotation flags through out libraries // sets autorotation flags through out libraries
heli_set_autorotation(heli_flags.in_autorotation); heli_set_autorotation(heli_flags.in_autorotation);
if (!ap.land_complete) { if (!ap.land_complete && g2.arot.is_enable()) {
motors->set_enable_bailout(true); motors->set_enable_bailout(true);
} else { } else {
motors->set_enable_bailout(false); motors->set_enable_bailout(false);

Loading…
Cancel
Save