mirror of https://github.com/ArduPilot/ardupilot
AP_BattMonitor: unify singleton naming to _singleton and get_singleton()
This commit is contained in:
parent
548a579f18
commit
8ef4616bc2
|
@ -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();
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue