mirror of https://github.com/ArduPilot/ardupilot
AC_Sprayer: make configurable in hwdef.dat
This commit is contained in:
parent
c3263d057f
commit
00ba5e4992
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue