mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-04 06:58:39 -04:00
AP_Notify: 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
c13eaf0c7f
commit
cd51c71857
@ -40,19 +40,17 @@ class AP_Notify
|
||||
friend class RGBLed; // RGBLed needs access to notify parameters
|
||||
friend class Display; // Display needs access to notify parameters
|
||||
public:
|
||||
static AP_Notify create() { return AP_Notify{}; }
|
||||
AP_Notify();
|
||||
|
||||
/* Do not allow copies */
|
||||
AP_Notify(const AP_Notify &other) = delete;
|
||||
AP_Notify &operator=(const AP_Notify&) = delete;
|
||||
|
||||
// get singleton instance
|
||||
static AP_Notify *instance(void) {
|
||||
return _instance;
|
||||
}
|
||||
|
||||
constexpr AP_Notify(AP_Notify &&other) = default;
|
||||
|
||||
/* Do not allow copies */
|
||||
AP_Notify(const AP_Notify &other) = delete;
|
||||
AP_Notify &operator=(const AP_Notify&) = delete;
|
||||
|
||||
// Oreo LED Themes
|
||||
enum Oreo_LED_Theme {
|
||||
OreoLED_Disabled = 0, // Disabled the OLED driver entirely
|
||||
@ -145,8 +143,6 @@ public:
|
||||
static const struct AP_Param::GroupInfo var_info[];
|
||||
|
||||
private:
|
||||
AP_Notify();
|
||||
|
||||
static AP_Notify *_instance;
|
||||
|
||||
// parameters
|
||||
|
Loading…
Reference in New Issue
Block a user