Browse Source

AP_Baro: rename dataflash to logger

master
Tom Pittenger 6 years ago committed by Peter Barker
parent
commit
b54da9aab8
  1. 10
      libraries/AP_Baro/AP_Baro.cpp
  2. 2
      libraries/AP_Baro/AP_Baro.h

10
libraries/AP_Baro/AP_Baro.cpp

@ -706,16 +706,16 @@ void AP_Baro::_probe_i2c_barometers(void) @@ -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) @@ -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();
}
}

2
libraries/AP_Baro/AP_Baro.h

@ -179,7 +179,7 @@ public: @@ -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…
Cancel
Save