From a0f74af40785e56bbf8626d38556b48c1d815a9a Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 16 Feb 2024 10:36:51 +1100 Subject: [PATCH] RC_Channel: disable GPS on external AHRS with GPS_DISABLE --- libraries/RC_Channel/RC_Channel.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libraries/RC_Channel/RC_Channel.cpp b/libraries/RC_Channel/RC_Channel.cpp index 296afb878b..b868d8bb63 100644 --- a/libraries/RC_Channel/RC_Channel.cpp +++ b/libraries/RC_Channel/RC_Channel.cpp @@ -1375,6 +1375,9 @@ bool RC_Channel::do_aux_function(const aux_func_t ch_option, const AuxSwitchPos case AUX_FUNC::GPS_DISABLE: AP::gps().force_disable(ch_flag == AuxSwitchPos::HIGH); +#if HAL_EXTERNAL_AHRS_ENABLED + AP::externalAHRS().set_gnss_disable(ch_flag == AuxSwitchPos::HIGH); +#endif break; case AUX_FUNC::GPS_DISABLE_YAW: