Skip to content

Commit

Permalink
SRV_Channel: call update_aux_servo_function in function_assigned
Browse files Browse the repository at this point in the history
  • Loading branch information
IamPete1 authored and tridge committed Sep 1, 2021
1 parent 129eb4c commit e828602
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions libraries/SRV_Channel/SRV_Channel_aux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,9 @@ SRV_Channels::set_output_limit(SRV_Channel::Aux_servo_function_t function, SRV_C
bool
SRV_Channels::function_assigned(SRV_Channel::Aux_servo_function_t function)
{
if (!initialised) {
update_aux_servo_function();
}
return function_mask.get(uint16_t(function));
}

Expand Down Expand Up @@ -486,9 +489,6 @@ SRV_Channels::move_servo(SRV_Channel::Aux_servo_function_t function,
*/
bool SRV_Channels::set_aux_channel_default(SRV_Channel::Aux_servo_function_t function, uint8_t channel)
{
if (!initialised) {
update_aux_servo_function();
}
if (function_assigned(function)) {
// already assigned
return true;
Expand All @@ -513,9 +513,6 @@ bool SRV_Channels::set_aux_channel_default(SRV_Channel::Aux_servo_function_t fun
// find first channel that a function is assigned to
bool SRV_Channels::find_channel(SRV_Channel::Aux_servo_function_t function, uint8_t &chan)
{
if (!initialised) {
update_aux_servo_function();
}
if (!function_assigned(function)) {
return false;
}
Expand Down

0 comments on commit e828602

Please sign in to comment.