mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-18 06:38:29 -04:00
AC_Sprayer: add static create method
This commit is contained in:
parent
eadd650d78
commit
e1733a5a99
@ -31,11 +31,16 @@
|
|||||||
/// @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 {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
static AC_Sprayer create(const AP_InertialNav *inav) {
|
||||||
|
return AC_Sprayer{inav};
|
||||||
|
}
|
||||||
|
|
||||||
/// Constructor
|
constexpr AC_Sprayer(AC_Sprayer &&other) = default;
|
||||||
AC_Sprayer(const AP_InertialNav* inav);
|
|
||||||
|
/* Do not allow copies */
|
||||||
|
AC_Sprayer(const AC_Sprayer &other) = delete;
|
||||||
|
AC_Sprayer &operator=(const AC_Sprayer&) = delete;
|
||||||
|
|
||||||
/// run - allow or disallow spraying to occur
|
/// run - allow or disallow spraying to occur
|
||||||
void run(bool true_false);
|
void run(bool true_false);
|
||||||
@ -60,6 +65,8 @@ public:
|
|||||||
static const struct AP_Param::GroupInfo var_info[];
|
static const struct AP_Param::GroupInfo var_info[];
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
AC_Sprayer(const AP_InertialNav *inav);
|
||||||
|
|
||||||
const AP_InertialNav* const _inav; ///< pointers to other objects we depend upon
|
const AP_InertialNav* const _inav; ///< pointers to other objects we depend upon
|
||||||
|
|
||||||
// parameters
|
// parameters
|
||||||
|
Loading…
Reference in New Issue
Block a user