diff --git a/libraries/AP_SerialManager/AP_SerialManager.cpp b/libraries/AP_SerialManager/AP_SerialManager.cpp index a4a0f7b2bf..4c8d74016c 100644 --- a/libraries/AP_SerialManager/AP_SerialManager.cpp +++ b/libraries/AP_SerialManager/AP_SerialManager.cpp @@ -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(); } } diff --git a/libraries/AP_SerialManager/AP_SerialManager.h b/libraries/AP_SerialManager/AP_SerialManager.h index fa395d9117..5ec8956331 100644 --- a/libraries/AP_SerialManager/AP_SerialManager.h +++ b/libraries/AP_SerialManager/AP_SerialManager.h @@ -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 {