Rover: add option to disable relay and servorelay libraries

This commit is contained in:
Peter Barker 2023-06-06 18:05:07 +10:00 committed by Peter Barker
parent ccd39efe1c
commit cf67b0a71a
3 changed files with 6 additions and 0 deletions

View File

@ -221,9 +221,11 @@ const AP_Param::Info Rover::var_info[] = {
// @Path: ../libraries/AP_Baro/AP_Baro.cpp
GOBJECT(barometer, "BARO", AP_Baro),
#if AP_RELAY_ENABLED
// @Group: RELAY_
// @Path: ../libraries/AP_Relay/AP_Relay.cpp
GOBJECT(relay, "RELAY_", AP_Relay),
#endif
// @Group: RCMAP_
// @Path: ../libraries/AP_RCMapper/AP_RCMapper.cpp

View File

@ -96,7 +96,9 @@ const AP_Scheduler::Task Rover::scheduler_tasks[] = {
SCHED_TASK_CLASS(RC_Channels, (RC_Channels*)&rover.g2.rc_channels, read_mode_switch, 7, 200, 57),
SCHED_TASK_CLASS(RC_Channels, (RC_Channels*)&rover.g2.rc_channels, read_aux_all, 10, 200, 60),
SCHED_TASK_CLASS(AP_BattMonitor, &rover.battery, read, 10, 300, 63),
#if AP_SERVORELAYEVENTS_ENABLED
SCHED_TASK_CLASS(AP_ServoRelayEvents, &rover.ServoRelayEvents, update_events, 50, 200, 66),
#endif
#if AP_GRIPPER_ENABLED
SCHED_TASK_CLASS(AP_Gripper, &rover.g2.gripper, update, 10, 75, 69),
#endif

View File

@ -107,7 +107,9 @@ void Rover::init_ardupilot()
optflow.init(MASK_LOG_OPTFLOW);
#endif // AP_OPTICALFLOW_ENABLED
#if AP_RELAY_ENABLED
relay.init();
#endif
#if HAL_MOUNT_ENABLED
// initialise camera mount