mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-02 05:58:30 -04:00
Blimp: move to AuxFuncTrigger structure
This commit is contained in:
parent
f7c4320e86
commit
46f30527cb
@ -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
|
// 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) {
|
switch (ch_option) {
|
||||||
|
|
||||||
case AUX_FUNC::SAVE_TRIM:
|
case AUX_FUNC::SAVE_TRIM:
|
||||||
@ -120,7 +123,7 @@ bool RC_Channel_Blimp::do_aux_function(const AUX_FUNC ch_option, const AuxSwitch
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return RC_Channel::do_aux_function(ch_option, ch_flag);
|
return RC_Channel::do_aux_function(trigger);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
|
|
||||||
void init_aux_function(AUX_FUNC ch_option, AuxSwitchPos) override;
|
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:
|
private:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user