Skip to content

Commit

Permalink
AP_Mission: correct compilation when RC_Channel not enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker committed Dec 11, 2023
1 parent 75217ec commit f969871
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libraries/AP_Mission/AP_Mission.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,10 @@ bool AP_Mission::start_command(const Mission_Command& cmd)
}

switch (cmd.id) {
#if AP_RC_CHANNEL_ENABLED
case MAV_CMD_DO_AUX_FUNCTION:
return start_command_do_aux_function(cmd);
#endif
#if AP_GRIPPER_ENABLED
case MAV_CMD_DO_GRIPPER:
return start_command_do_gripper(cmd);
Expand Down
2 changes: 2 additions & 0 deletions libraries/AP_Mission/AP_Mission_Commands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <RC_Channel/RC_Channel.h>
#include <AP_Mount/AP_Mount.h>

#if AP_RC_CHANNEL_ENABLED
bool AP_Mission::start_command_do_aux_function(const AP_Mission::Mission_Command& cmd)
{
const RC_Channel::AUX_FUNC function = (RC_Channel::AUX_FUNC)cmd.content.auxfunction.function;
Expand All @@ -28,6 +29,7 @@ bool AP_Mission::start_command_do_aux_function(const AP_Mission::Mission_Command
rc().run_aux_function(function, pos, RC_Channel::AuxFuncTriggerSource::MISSION);
return true;
}
#endif // AP_RC_CHANNEL_ENABLED

#if AP_GRIPPER_ENABLED
bool AP_Mission::start_command_do_gripper(const AP_Mission::Mission_Command& cmd)
Expand Down

0 comments on commit f969871

Please sign in to comment.