mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-10-24 08:56:04 +08:00
AP_Compass: move responsibility for logging into library
This commit is contained in:
committed by
Andrew Tridgell
parent
c6a9130d84
commit
bf23f1df67
@@ -981,7 +981,11 @@ Compass::read(void)
|
||||
if (_learn == LEARN_INFLIGHT && learn != nullptr) {
|
||||
learn->update();
|
||||
}
|
||||
return healthy();
|
||||
bool ret = healthy();
|
||||
if (ret && _log_bit != (uint32_t)-1 && AP::logger().should_log(_log_bit) && !AP::ahrs().have_ekf_logging()) {
|
||||
AP::logger().Write_Compass();
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
uint8_t
|
||||
|
||||
Reference in New Issue
Block a user