From ca7842afacac5cfc1f9a2ea1ea2b3e99620bda87 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Fri, 8 Jun 2018 19:22:55 +1000 Subject: [PATCH] Rover: add support for Sprayer --- APMrover2/APMrover2.cpp | 1 + APMrover2/Parameters.cpp | 4 ++++ APMrover2/Parameters.h | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/APMrover2/APMrover2.cpp b/APMrover2/APMrover2.cpp index ece8f9f75c..a4c30b9a1e 100644 --- a/APMrover2/APMrover2.cpp +++ b/APMrover2/APMrover2.cpp @@ -77,6 +77,7 @@ 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), + SCHED_TASK_CLASS(AC_Sprayer, &rover.g2.sprayer, update, 3, 90), SCHED_TASK(compass_cal_update, 50, 200), SCHED_TASK(compass_save, 0.1, 200), SCHED_TASK(accel_cal_update, 10, 200), diff --git a/APMrover2/Parameters.cpp b/APMrover2/Parameters.cpp index 86ce8d3e42..3cf40bce09 100644 --- a/APMrover2/Parameters.cpp +++ b/APMrover2/Parameters.cpp @@ -571,6 +571,10 @@ const AP_Param::GroupInfo ParametersG2::var_info[] = { // @User: Standard AP_GROUPINFO("LOIT_TYPE", 25, ParametersG2, loit_type, 0), + // @Group: SPRAYER_ + // @Path: ../libraries/AC_Sprayer/AC_Sprayer.cpp + AP_SUBGROUPINFO(sprayer, "SPRAY_", 26, ParametersG2, AC_Sprayer), + AP_GROUPEND }; diff --git a/APMrover2/Parameters.h b/APMrover2/Parameters.h index 75f92667d7..bb42072d94 100644 --- a/APMrover2/Parameters.h +++ b/APMrover2/Parameters.h @@ -3,6 +3,7 @@ #include #include "RC_Channel.h" +#include "AC_Sprayer/AC_Sprayer.h" // Global parameter class. // @@ -357,6 +358,9 @@ public: // loiter type AP_Int8 loit_type; + + // Sprayer + AC_Sprayer sprayer; }; extern const AP_Param::Info var_info[];