Skip to content

Commit

Permalink
Copter: Set force flying flag with inverted flag
Browse files Browse the repository at this point in the history
  • Loading branch information
bnsgeyer committed Mar 17, 2024
1 parent 13841b2 commit 38d8aa3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ArduCopter/RC_Channel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,7 @@ bool RC_Channel_Copter::do_aux_function(const AUX_FUNC ch_option, const AuxSwitc
case AuxSwitchPos::HIGH:
if (copter.flightmode->allows_inverted()) {
copter.attitude_control->set_inverted_flight(true);
copter.force_flying = true;
} else {
gcs().send_text(MAV_SEVERITY_WARNING, "Inverted flight not available in %s mode", copter.flightmode->name());
}
Expand All @@ -432,6 +433,7 @@ bool RC_Channel_Copter::do_aux_function(const AUX_FUNC ch_option, const AuxSwitc
break;
case AuxSwitchPos::LOW:
copter.attitude_control->set_inverted_flight(false);
copter.force_flying = false;
break;
}
#endif
Expand Down

0 comments on commit 38d8aa3

Please sign in to comment.