AP_BattMonitor: unify singleton naming to _singleton and get_singleton()

This commit is contained in:
Tom Pittenger 2019-02-10 10:56:13 -08:00 committed by Tom Pittenger
parent 548a579f18
commit 8ef4616bc2
2 changed files with 4 additions and 4 deletions

View File

@ -238,7 +238,7 @@ AP_BattMonitor::read()
}
}
AP_Logger *df = AP_Logger::instance();
AP_Logger *df = AP_Logger::get_singleton();
if (df->should_log(_log_battery_bit)) {
df->Write_Current();
df->Write_Power();
@ -494,7 +494,7 @@ namespace AP {
AP_BattMonitor &battery()
{
return AP_BattMonitor::battery();
return *AP_BattMonitor::get_singleton();
}
};

View File

@ -54,8 +54,8 @@ public:
AP_BattMonitor(const AP_BattMonitor &other) = delete;
AP_BattMonitor &operator=(const AP_BattMonitor&) = delete;
static AP_BattMonitor &battery() {
return *_singleton;
static AP_BattMonitor *get_singleton() {
return _singleton;
}
struct cells {