1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-01 09:24:10 +01:00

LP-183 fix GCS regression caused by UAVObject TRUE/FALSE enum case change

This commit is contained in:
Philippe Renon 2015-12-18 21:35:05 +01:00
parent 6cac60f32d
commit 1b486aafb2
2 changed files with 5 additions and 5 deletions

View File

@ -275,7 +275,7 @@ void ConfigStabilizationWidget::updateThrottleCurveFromObject()
field = stabBank->getField("EnableThrustPIDScaling");
Q_ASSERT(field);
bool enabled = field->getValue() == "TRUE";
bool enabled = field->getValue() == "True";
ui->enableThrustPIDScalingCheckBox->setChecked(enabled);
ui->thrustPIDScalingCurve->setEnabled(enabled);
setDirty(dirty);
@ -297,7 +297,7 @@ void ConfigStabilizationWidget::updateObjectFromThrottleCurve()
field = stabBank->getField("EnableThrustPIDScaling");
Q_ASSERT(field);
field->setValue(ui->enableThrustPIDScalingCheckBox->isChecked() ? "TRUE" : "FALSE");
field->setValue(ui->enableThrustPIDScalingCheckBox->isChecked() ? "True" : "False");
}
void ConfigStabilizationWidget::setupExpoPlot()
@ -371,7 +371,7 @@ void ConfigStabilizationWidget::resetThrottleCurveToDefault()
field = defaultStabBank->getField("EnableThrustPIDScaling");
Q_ASSERT(field);
bool enabled = field->getValue() == "TRUE";
bool enabled = field->getValue() == "True";
ui->enableThrustPIDScalingCheckBox->setChecked(enabled);
ui->thrustPIDScalingCurve->setEnabled(enabled);

View File

@ -912,7 +912,7 @@ QVariant ConfigTaskWidget::getVariantFromWidget(QWidget *widget, WidgetBinding *
} else if (QSlider * cb = qobject_cast<QSlider *>(widget)) {
return (double)(cb->value() * scale);
} else if (QCheckBox * cb = qobject_cast<QCheckBox *>(widget)) {
return (QString)(cb->isChecked() ? "TRUE" : "FALSE");
return (QString)(cb->isChecked() ? "True" : "False");
} else if (QLineEdit * cb = qobject_cast<QLineEdit *>(widget)) {
QString value = (QString)cb->displayText();
if (binding->units() == "hex") {
@ -955,7 +955,7 @@ bool ConfigTaskWidget::setWidgetFromVariant(QWidget *widget, QVariant value, Wid
cb->setValue((int)qRound(value.toDouble() / scale));
return true;
} else if (QCheckBox * cb = qobject_cast<QCheckBox *>(widget)) {
bool bvalue = value.toString() == "TRUE";
bool bvalue = value.toString() == "True";
cb->setChecked(bvalue);
return true;
} else if (QLineEdit * cb = qobject_cast<QLineEdit *>(widget)) {