Skip to content

Commit

Permalink
Merge branch 'master' into ZeroOneX6_Air
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeroOne-Aero authored Dec 24, 2024
2 parents 834c17a + 5a8bc16 commit 7136568
Show file tree
Hide file tree
Showing 24 changed files with 1,167 additions and 1,163 deletions.
9 changes: 6 additions & 3 deletions ArduCopter/RC_Channel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ void RC_Channel_Copter::init_aux_function(const AUX_FUNC ch_option, const AuxSwi
case AUX_FUNC::CUSTOM_CONTROLLER:
case AUX_FUNC::WEATHER_VANE_ENABLE:
case AUX_FUNC::TRANSMITTER_TUNING:
run_aux_function(ch_option, ch_flag, AuxFuncTriggerSource::INIT);
run_aux_function(ch_option, ch_flag, AuxFuncTrigger::Source::INIT, ch_in);
break;
default:
RC_Channel::init_aux_function(ch_option, ch_flag);
Expand Down Expand Up @@ -169,8 +169,11 @@ void RC_Channel_Copter::do_aux_function_change_mode(const Mode::Number mode,
}

// do_aux_function - implement the function invoked by auxiliary switches
bool RC_Channel_Copter::do_aux_function(const AUX_FUNC ch_option, const AuxSwitchPos ch_flag)
bool RC_Channel_Copter::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::FLIP:
// flip if switch is on, positive throttle and we're actually flying
Expand Down Expand Up @@ -668,7 +671,7 @@ bool RC_Channel_Copter::do_aux_function(const AUX_FUNC ch_option, const AuxSwitc
break;

default:
return RC_Channel::do_aux_function(ch_option, ch_flag);
return RC_Channel::do_aux_function(trigger);
}
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion ArduCopter/RC_Channel.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class RC_Channel_Copter : public RC_Channel
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:

Expand Down
Loading

0 comments on commit 7136568

Please sign in to comment.