From b271d9d5e3364f9a8ee61f7e407fb10d2b21b69b Mon Sep 17 00:00:00 2001 From: 3djc Date: Sun, 10 Mar 2024 10:58:55 +0100 Subject: [PATCH] fix: disable override when both GF and SF are off (#4712) --- radio/src/mixer.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/radio/src/mixer.cpp b/radio/src/mixer.cpp index cbe00ffc8..93ae267c9 100644 --- a/radio/src/mixer.cpp +++ b/radio/src/mixer.cpp @@ -1140,6 +1140,13 @@ void evalMixes(uint8_t tick10ms) } else { modelFunctionsContext.reset(); } +#if defined(OVERRIDE_CHANNEL_FUNCTION) + if (!radioGFEnabled() && !modelSFEnabled()) { + for (uint8_t i = 0; i < MAX_OUTPUT_CHANNELS; i++) { + safetyCh[i] = OVERRIDE_CHANNEL_UNDEFINED; + } + } +#endif } //========== LIMITS ===============