mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-21 07:13:56 -04:00
AP_LeakDetector: 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
645508224f
commit
5f4680bf2c
@ -14,9 +14,7 @@ class AP_LeakDetector {
|
|||||||
friend class AP_LeakDetector_Digital;
|
friend class AP_LeakDetector_Digital;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static AP_LeakDetector create() { return AP_LeakDetector{}; }
|
AP_LeakDetector();
|
||||||
|
|
||||||
constexpr AP_LeakDetector(AP_LeakDetector &&other) = default;
|
|
||||||
|
|
||||||
/* Do not allow copies */
|
/* Do not allow copies */
|
||||||
AP_LeakDetector(const AP_LeakDetector &other) = delete;
|
AP_LeakDetector(const AP_LeakDetector &other) = delete;
|
||||||
@ -48,8 +46,6 @@ public:
|
|||||||
static const struct AP_Param::GroupInfo var_info[];
|
static const struct AP_Param::GroupInfo var_info[];
|
||||||
|
|
||||||
private:
|
private:
|
||||||
AP_LeakDetector();
|
|
||||||
|
|
||||||
AP_LeakDetector_Backend *_drivers[LEAKDETECTOR_MAX_INSTANCES];
|
AP_LeakDetector_Backend *_drivers[LEAKDETECTOR_MAX_INSTANCES];
|
||||||
LeakDetector_State _state[LEAKDETECTOR_MAX_INSTANCES];
|
LeakDetector_State _state[LEAKDETECTOR_MAX_INSTANCES];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user