Browse Source

AC_Sprayer: make configurable in hwdef.dat

zr-v5.1
Andrew Tridgell 5 years ago
parent
commit
00ba5e4992
  1. 3
      libraries/AC_Sprayer/AC_Sprayer.cpp
  2. 7
      libraries/AC_Sprayer/AC_Sprayer.h

3
libraries/AC_Sprayer/AC_Sprayer.cpp

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

7
libraries/AC_Sprayer/AC_Sprayer.h

@ -25,6 +25,12 @@ @@ -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_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
/// @brief Object managing a crop sprayer comprised of a spinner and a pump both controlled by pwm
class AC_Sprayer {
@ -86,3 +92,4 @@ private: @@ -86,3 +92,4 @@ private:
namespace AP {
AC_Sprayer *sprayer();
};
#endif // HAL_SPRAYER_ENABLED

Loading…
Cancel
Save