1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-18 03:52:11 +01:00

OP-1351 fixed issue that caused thermal calibration to progress bar to move back

This commit is contained in:
Philippe Renon 2014-05-31 18:43:49 +02:00
parent 5182ccc2eb
commit 489f59b65d

View File

@ -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) {