From 46f30527cbc57e6f7715dfb62a70becd193fc799 Mon Sep 17 00:00:00 2001 From: Iampete1 Date: Fri, 13 Dec 2024 21:15:47 +0000 Subject: [PATCH] Blimp: move to AuxFuncTrigger structure --- Blimp/RC_Channel.cpp | 7 +++++-- Blimp/RC_Channel.h | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Blimp/RC_Channel.cpp b/Blimp/RC_Channel.cpp index 1132d82330..6dafa3b8e5 100644 --- a/Blimp/RC_Channel.cpp +++ b/Blimp/RC_Channel.cpp @@ -99,8 +99,11 @@ void RC_Channel_Blimp::do_aux_function_change_mode(const Mode::Number mode, } // do_aux_function - implement the function invoked by auxiliary switches -bool RC_Channel_Blimp::do_aux_function(const AUX_FUNC ch_option, const AuxSwitchPos ch_flag) +bool RC_Channel_Blimp::do_aux_function(const AuxFuncTrigger &trigger) { + const AUX_FUNC &ch_option = trigger.func; + const AuxSwitchPos &ch_flag = trigger.pos; + switch (ch_option) { case AUX_FUNC::SAVE_TRIM: @@ -120,7 +123,7 @@ bool RC_Channel_Blimp::do_aux_function(const AUX_FUNC ch_option, const AuxSwitch break; default: - return RC_Channel::do_aux_function(ch_option, ch_flag); + return RC_Channel::do_aux_function(trigger); } return true; } diff --git a/Blimp/RC_Channel.h b/Blimp/RC_Channel.h index 4a6e5e0156..12f9ae2f7c 100644 --- a/Blimp/RC_Channel.h +++ b/Blimp/RC_Channel.h @@ -12,7 +12,7 @@ public: protected: void init_aux_function(AUX_FUNC ch_option, AuxSwitchPos) override; - bool do_aux_function(AUX_FUNC ch_option, AuxSwitchPos) override; + bool do_aux_function(const AuxFuncTrigger &trigger) override; private: