mirror of https://github.com/ArduPilot/ardupilot
AP_Mission: correct compilation when RC_Channel not enabled
This commit is contained in:
parent
22c1019767
commit
f6bff8c19e
|
@ -10,6 +10,7 @@
|
|||
#include <AP_Vehicle/AP_Vehicle_Type.h>
|
||||
#include <AP_BoardConfig/AP_BoardConfig.h>
|
||||
#include <AP_ServoRelayEvents/AP_ServoRelayEvents_config.h>
|
||||
#include <RC_Channel/RC_Channel_config.h>
|
||||
|
||||
const AP_Param::GroupInfo AP_Mission::var_info[] = {
|
||||
|
||||
|
@ -405,8 +406,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);
|
||||
|
|
|
@ -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;
|
||||
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue