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:
Julian Oes
2021-08-30 21:05:40 -04:00
committed by Daniel Agar
parent ca685490a9
commit 6cb0259b79
+4 -2
View File
@@ -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