From 282949d715359a93e8b03be8481fa4578a2b58f8 Mon Sep 17 00:00:00 2001 From: Alexey <lysenkoalexmail@gmail.com> Date: Sat, 21 Mar 2020 14:42:54 +0100 Subject: [PATCH] Removed unreachable code --- src/AutoPilotPlugins/APM/APMCompassCal.cc | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/src/AutoPilotPlugins/APM/APMCompassCal.cc b/src/AutoPilotPlugins/APM/APMCompassCal.cc index e976e92f1b..02fcc2d31a 100644 --- a/src/AutoPilotPlugins/APM/APMCompassCal.cc +++ b/src/AutoPilotPlugins/APM/APMCompassCal.cc @@ -200,21 +200,11 @@ CalWorkerThread::calibrate_return CalWorkerThread::mag_calibration_worker(detect worker_data->calibration_counter_total[cur_mag]++; } - // Keep calibration of all mags in lockstep - if (rejected) { - qCDebug(APMCompassCalLog) << QStringLiteral("Point rejected"); + calibration_counter_side++; - // Reset counts, since one of the mags rejected the measurement - for (size_t cur_mag = 0; cur_mag < max_mags; cur_mag++) { - worker_data->calibration_counter_total[cur_mag] = prev_count[cur_mag]; - } - } else { - calibration_counter_side++; - - // Progress indicator for side - _emitVehicleTextMessage(QStringLiteral("[cal] %1 side calibration: progress <%2>").arg(detect_orientation_str(orientation)).arg(progress_percentage(worker_data) + - (unsigned)((100 / calibration_sides) * ((float)calibration_counter_side / (float)worker_data->calibration_points_perside)))); - } + // Progress indicator for side + _emitVehicleTextMessage(QStringLiteral("[cal] %1 side calibration: progress <%2>").arg(detect_orientation_str(orientation)).arg(progress_percentage(worker_data) + + (unsigned)((100 / calibration_sides) * ((float)calibration_counter_side / (float)worker_data->calibration_points_perside)))); usleep(loop_interval_usecs); } -- GitLab