Plane: arming: do not disable asisted flight airmode on disarm

This commit is contained in:
Iampete1 2021-08-22 10:29:23 +01:00 committed by Andrew Tridgell
parent 46670f7bd0
commit 4efa9866fa

View File

@ -252,7 +252,7 @@ bool AP_Arming_Plane::disarm(const AP_Arming::Method method, bool do_disarm_chec
plane.throttle_suppressed = plane.control_mode->does_auto_throttle();
// if no airmode switch assigned, ensure airmode is off:
if (rc().find_channel_for_option(RC_Channel::AUX_FUNC::AIRMODE) == nullptr) {
if ((plane.quadplane.air_mode == AirMode::ON) && (rc().find_channel_for_option(RC_Channel::AUX_FUNC::AIRMODE) == nullptr)) {
plane.quadplane.air_mode = AirMode::OFF;
}