mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-11 04:43:33 +08:00
commander: improve progress output
Instead of outputting progress at weird percentages and dropping 100%, this now sends the progress every 10 %.
This commit is contained in:
@@ -141,8 +141,10 @@ static calibrate_return gyro_calibration_worker(gyro_worker_data_t &worker_data)
|
||||
}
|
||||
}
|
||||
|
||||
if (update_count % (CALIBRATION_COUNT / 20) == 0) {
|
||||
calibration_log_info(worker_data.mavlink_log_pub, CAL_QGC_PROGRESS_MSG, (update_count * 100) / CALIBRATION_COUNT);
|
||||
const unsigned progress = (update_count * 100) / CALIBRATION_COUNT;
|
||||
|
||||
if (progress % 10 == 0) {
|
||||
calibration_log_info(worker_data.mavlink_log_pub, CAL_QGC_PROGRESS_MSG, progress);
|
||||
}
|
||||
|
||||
// Propagate out the slowest sensor's count
|
||||
|
||||
Reference in New Issue
Block a user