commander: gyro calibration use all queued data

- print calibration status when finished
This commit is contained in:
Daniel Agar
2020-08-17 16:15:35 -04:00
parent f2c9865c9b
commit f9aca05ede

View File

@@ -130,7 +130,7 @@ static calibrate_return gyro_calibration_worker(gyro_worker_data_t &worker_data)
sensor_gyro_s gyro_report; sensor_gyro_s gyro_report;
if (gyro_sub[gyro_index].update(&gyro_report)) { while (gyro_sub[gyro_index].update(&gyro_report)) {
// fetch optional thermal offset corrections in sensor/board frame // fetch optional thermal offset corrections in sensor/board frame
Vector3f offset{0, 0, 0}; Vector3f offset{0, 0, 0};
@@ -298,6 +298,8 @@ int do_gyro_calibration(orb_advert_t *mavlink_log_pub)
if (calibration.device_id() != 0) { if (calibration.device_id() != 0) {
calibration.set_offset(worker_data.offset[uorb_index]); calibration.set_offset(worker_data.offset[uorb_index]);
calibration.PrintStatus();
} else { } else {
calibration.Reset(); calibration.Reset();
} }