mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
AC_Sprayer: removed create() method for objects
See discussion here: https://github.com/ArduPilot/ardupilot/issues/7331 we were getting some uninitialised variables. While it only showed up in AP_SbusOut, it means we can't be sure it won't happen on other objects, so safest to remove the approach Thanks to assistance from Lucas, Peter and Francisco
This commit is contained in:
parent
9ba8097502
commit
85f9fecd24
@ -32,11 +32,7 @@
|
||||
/// @brief Object managing a crop sprayer comprised of a spinner and a pump both controlled by pwm
|
||||
class AC_Sprayer {
|
||||
public:
|
||||
static AC_Sprayer create(const AP_InertialNav *inav) {
|
||||
return AC_Sprayer{inav};
|
||||
}
|
||||
|
||||
constexpr AC_Sprayer(AC_Sprayer &&other) = default;
|
||||
AC_Sprayer(const AP_InertialNav *inav);
|
||||
|
||||
/* Do not allow copies */
|
||||
AC_Sprayer(const AC_Sprayer &other) = delete;
|
||||
@ -65,8 +61,6 @@ public:
|
||||
static const struct AP_Param::GroupInfo var_info[];
|
||||
|
||||
private:
|
||||
AC_Sprayer(const AP_InertialNav *inav);
|
||||
|
||||
const AP_InertialNav* const _inav; ///< pointers to other objects we depend upon
|
||||
|
||||
// parameters
|
||||
|
Loading…
Reference in New Issue
Block a user