From 489f59b65d560521ab384b78dcbc793848910f91 Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Sat, 31 May 2014 18:43:49 +0200 Subject: [PATCH] OP-1351 fixed issue that caused thermal calibration to progress bar to move back --- .../config/calibration/thermal/thermalcalibrationhelper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ground/openpilotgcs/src/plugins/config/calibration/thermal/thermalcalibrationhelper.cpp b/ground/openpilotgcs/src/plugins/config/calibration/thermal/thermalcalibrationhelper.cpp index 5116bbf21..6aaa86262 100644 --- a/ground/openpilotgcs/src/plugins/config/calibration/thermal/thermalcalibrationhelper.cpp +++ b/ground/openpilotgcs/src/plugins/config/calibration/thermal/thermalcalibrationhelper.cpp @@ -402,7 +402,7 @@ void ThermalCalibrationHelper::updateTemp(float temp) } if (m_targetduration != 0) { - int tmp = ((ProcessPercentageBaseCalculation - ProcessPercentageBaseAcquisition) * elapsed) / m_targetduration; + int tmp = ProcessPercentageBaseAcquisition + ((ProcessPercentageBaseCalculation - ProcessPercentageBaseAcquisition) * elapsed) / m_targetduration; tmp = tmp > ProcessPercentageBaseCalculation - 5 ? ProcessPercentageBaseCalculation - 5 : tmp; setProgress(tmp); } else if (m_gradient > .1 && m_initialGradient / 2.0f > m_gradient) {