1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-29 07:24:13 +01:00

OP-1734 replace double with qreal

This commit is contained in:
Laurent Lalanne 2015-02-20 16:39:19 +01:00
parent 1792991012
commit 518059a6b1

View File

@ -646,10 +646,10 @@ void OutputCalibrationPage::on_servoCenterAngleSlider_valueChanged(int position)
quint16 middle = minValue + (range / 2);
qreal arrowOpacity = 0;
if (value < limitLow) {
arrowOpacity = double(middle - value) / double(middle - minValue);
arrowOpacity = (qreal)(middle - value) / (qreal)(middle - minValue);
showElementMovement((ui->reverseCheckbox->isChecked() ? true : false), arrowOpacity);
} else if (value > limitHigh) {
arrowOpacity = double(value - middle) / double(maxValue - middle);
arrowOpacity = (qreal)(value - middle) / (qreal)(maxValue - middle);
showElementMovement((ui->reverseCheckbox->isChecked() ? false : true), arrowOpacity);
}