From b3c44d42d7a58b730450447a99862475afcf385f Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 18 Jan 2020 11:36:11 +1100 Subject: [PATCH] Rover: use HAL_SPRAYER_ENABLED --- APMrover2/Parameters.cpp | 2 ++ APMrover2/Parameters.h | 2 ++ APMrover2/Rover.cpp | 2 ++ 3 files changed, 6 insertions(+) diff --git a/APMrover2/Parameters.cpp b/APMrover2/Parameters.cpp index 6b45fdbc8b..7e157971d2 100644 --- a/APMrover2/Parameters.cpp +++ b/APMrover2/Parameters.cpp @@ -519,9 +519,11 @@ const AP_Param::GroupInfo ParametersG2::var_info[] = { // @User: Standard AP_GROUPINFO("LOIT_TYPE", 25, ParametersG2, loit_type, 0), +#if HAL_SPRAYER_ENABLED // @Group: SPRAYER_ // @Path: ../libraries/AC_Sprayer/AC_Sprayer.cpp AP_SUBGROUPINFO(sprayer, "SPRAY_", 26, ParametersG2, AC_Sprayer), +#endif // @Group: WRC // @Path: ../libraries/AP_WheelEncoder/AP_WheelRateControl.cpp diff --git a/APMrover2/Parameters.h b/APMrover2/Parameters.h index e523f72d72..173ba19589 100644 --- a/APMrover2/Parameters.h +++ b/APMrover2/Parameters.h @@ -351,8 +351,10 @@ public: AP_Int8 loit_type; AP_Float loit_radius; +#if HAL_SPRAYER_ENABLED // Sprayer AC_Sprayer sprayer; +#endif #if GRIPPER_ENABLED AP_Gripper gripper; diff --git a/APMrover2/Rover.cpp b/APMrover2/Rover.cpp index 13de7e8eb6..c04f34555b 100644 --- a/APMrover2/Rover.cpp +++ b/APMrover2/Rover.cpp @@ -89,7 +89,9 @@ const AP_Scheduler::Task Rover::scheduler_tasks[] = { SCHED_TASK_CLASS(ModeSmartRTL, &rover.mode_smartrtl, save_position, 3, 200), SCHED_TASK_CLASS(AP_Notify, &rover.notify, update, 50, 300), SCHED_TASK(one_second_loop, 1, 1500), +#if HAL_SPRAYER_ENABLED SCHED_TASK_CLASS(AC_Sprayer, &rover.g2.sprayer, update, 3, 90), +#endif SCHED_TASK_CLASS(Compass, &rover.compass, cal_update, 50, 200), SCHED_TASK(compass_save, 0.1, 200), SCHED_TASK(accel_cal_update, 10, 200),