mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-26 17:53:59 -04:00
AP_Baro: rename dataflash to logger
This commit is contained in:
parent
4178ef98ba
commit
b54da9aab8
@ -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();
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user