mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
AP_SerialManager: unify singleton naming to _singleton and get_singleton()
This commit is contained in:
parent
752804c2a5
commit
add2130e07
@ -226,12 +226,12 @@ const AP_Param::GroupInfo AP_SerialManager::var_info[] = {
|
||||
};
|
||||
|
||||
// singleton instance
|
||||
AP_SerialManager *AP_SerialManager::_instance;
|
||||
AP_SerialManager *AP_SerialManager::_singleton;
|
||||
|
||||
// Constructor
|
||||
AP_SerialManager::AP_SerialManager()
|
||||
{
|
||||
_instance = this;
|
||||
_singleton = this;
|
||||
// setup parameter defaults
|
||||
AP_Param::setup_object_defaults(this, var_info);
|
||||
}
|
||||
@ -555,7 +555,7 @@ namespace AP {
|
||||
|
||||
AP_SerialManager &serialmanager()
|
||||
{
|
||||
return *AP_SerialManager::get_instance();
|
||||
return *AP_SerialManager::get_singleton();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -109,8 +109,8 @@ public:
|
||||
};
|
||||
|
||||
// get singleton instance
|
||||
static AP_SerialManager *get_instance(void) {
|
||||
return _instance;
|
||||
static AP_SerialManager *get_singleton(void) {
|
||||
return _singleton;
|
||||
}
|
||||
|
||||
// init_console - initialise console at default baud rate
|
||||
@ -154,7 +154,7 @@ public:
|
||||
static const struct AP_Param::GroupInfo var_info[];
|
||||
|
||||
private:
|
||||
static AP_SerialManager *_instance;
|
||||
static AP_SerialManager *_singleton;
|
||||
|
||||
// array of uart info
|
||||
struct UARTState {
|
||||
|
Loading…
Reference in New Issue
Block a user