mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-31 10:26:52 +08:00
logger: restore buffer statistics update
- this was accidentally dropped during a rebase of #14050
This commit is contained in:
@@ -785,6 +785,13 @@ void Logger::run()
|
|||||||
_last_sync_time = loop_time;
|
_last_sync_time = loop_time;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// update buffer statistics
|
||||||
|
for (int i = 0; i < (int)LogType::Count; ++i) {
|
||||||
|
if (!_statistics[i].dropout_start && (_writer.get_buffer_fill_count_file((LogType)i) > _statistics[i].high_water)) {
|
||||||
|
_statistics[i].high_water = _writer.get_buffer_fill_count_file((LogType)i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// publish logger status
|
// publish logger status
|
||||||
if (hrt_elapsed_time(&_logger_status_last) >= 1_s) {
|
if (hrt_elapsed_time(&_logger_status_last) >= 1_s) {
|
||||||
for (int i = 0; i < (int)LogType::Count; ++i) {
|
for (int i = 0; i < (int)LogType::Count; ++i) {
|
||||||
|
|||||||
Reference in New Issue
Block a user