mirror of https://github.com/ArduPilot/ardupilot
AP_Notify: add static create method
This commit is contained in:
parent
de680dac5b
commit
9463dbb408
|
@ -40,14 +40,19 @@ class AP_Notify
|
|||
friend class RGBLed; // RGBLed needs access to notify parameters
|
||||
friend class Display; // Display needs access to notify parameters
|
||||
public:
|
||||
// Constructor
|
||||
AP_Notify();
|
||||
static AP_Notify create() { return AP_Notify{}; }
|
||||
|
||||
// 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
|
||||
|
@ -140,6 +145,7 @@ public:
|
|||
static const struct AP_Param::GroupInfo var_info[];
|
||||
|
||||
private:
|
||||
AP_Notify();
|
||||
|
||||
static AP_Notify *_instance;
|
||||
|
||||
|
|
Loading…
Reference in New Issue