RC_Channel: make and use AP_LANDINGGEAR_ENABLED

This commit is contained in:
Peter Barker 2022-10-01 20:21:38 +10:00 committed by Andrew Tridgell
parent e10593ee69
commit 2f76e12522
1 changed files with 2 additions and 0 deletions

View File

@ -1148,6 +1148,7 @@ bool RC_Channel::do_aux_function(const aux_func_t ch_option, const AuxSwitchPos
}
break;
#if AP_LANDINGGEAR_ENABLED
case AUX_FUNC::LANDING_GEAR: {
AP_LandingGear *lg = AP_LandingGear::get_singleton();
if (lg == nullptr) {
@ -1166,6 +1167,7 @@ bool RC_Channel::do_aux_function(const aux_func_t ch_option, const AuxSwitchPos
}
break;
}
#endif
case AUX_FUNC::GPS_DISABLE:
AP::gps().force_disable(ch_flag == AuxSwitchPos::HIGH);