AC_Sprayer: make configurable in hwdef.dat

This commit is contained in:
Andrew Tridgell 2020-01-18 09:57:23 +11:00
parent c3263d057f
commit 00ba5e4992
2 changed files with 10 additions and 0 deletions

View File

@ -1,5 +1,7 @@
#include "AC_Sprayer.h" #include "AC_Sprayer.h"
#if HAL_SPRAYER_ENABLED
#include <AP_AHRS/AP_AHRS.h> #include <AP_AHRS/AP_AHRS.h>
#include <AP_HAL/AP_HAL.h> #include <AP_HAL/AP_HAL.h>
#include <AP_Math/AP_Math.h> #include <AP_Math/AP_Math.h>
@ -198,3 +200,4 @@ AC_Sprayer *sprayer()
} }
}; };
#endif // HAL_SPRAYER_ENABLED

View File

@ -25,6 +25,12 @@
#define AC_SPRAYER_DEFAULT_TURN_ON_DELAY 100 ///< delay between when we reach the minimum speed and we begin spraying. This reduces the likelihood of constantly turning on/off the pump #define AC_SPRAYER_DEFAULT_TURN_ON_DELAY 100 ///< delay between when we reach the minimum speed and we begin spraying. This reduces the likelihood of constantly turning on/off the pump
#define AC_SPRAYER_DEFAULT_SHUT_OFF_DELAY 1000 ///< shut-off delay in milli seconds. This reduces the likelihood of constantly turning on/off the pump #define AC_SPRAYER_DEFAULT_SHUT_OFF_DELAY 1000 ///< shut-off delay in milli seconds. This reduces the likelihood of constantly turning on/off the pump
#ifndef HAL_SPRAYER_ENABLED
#define HAL_SPRAYER_ENABLED !HAL_MINIMIZE_FEATURES
#endif
#if HAL_SPRAYER_ENABLED
/// @class AC_Sprayer /// @class AC_Sprayer
/// @brief Object managing a crop sprayer comprised of a spinner and a pump both controlled by pwm /// @brief Object managing a crop sprayer comprised of a spinner and a pump both controlled by pwm
class AC_Sprayer { class AC_Sprayer {
@ -86,3 +92,4 @@ private:
namespace AP { namespace AP {
AC_Sprayer *sprayer(); AC_Sprayer *sprayer();
}; };
#endif // HAL_SPRAYER_ENABLED