AP_Baro: rename dataflash to logger

This commit is contained in:
Tom Pittenger 2019-02-11 00:16:31 -08:00 committed by Peter Barker
parent 4178ef98ba
commit b54da9aab8
2 changed files with 6 additions and 6 deletions

View File

@ -706,16 +706,16 @@ void AP_Baro::_probe_i2c_barometers(void)
}
}
bool AP_Baro::should_df_log() const
bool AP_Baro::should_log() const
{
AP_Logger *instance = AP_Logger::get_singleton();
if (instance == nullptr) {
AP_Logger *logger = AP_Logger::get_singleton();
if (logger == nullptr) {
return false;
}
if (_log_baro_bit == (uint32_t)-1) {
return false;
}
if (!instance->should_log(_log_baro_bit)) {
if (!logger->should_log(_log_baro_bit)) {
return false;
}
return true;
@ -789,7 +789,7 @@ void AP_Baro::update(void)
}
// logging
if (should_df_log() && !AP::ahrs().have_ekf_logging()) {
if (should_log() && !AP::ahrs().have_ekf_logging()) {
AP::logger().Write_Baro();
}
}

View File

@ -179,7 +179,7 @@ public:
// indicate which bit in LOG_BITMASK indicates baro logging enabled
void set_log_baro_bit(uint32_t bit) { _log_baro_bit = bit; }
bool should_df_log() const;
bool should_log() const;
private:
// singleton