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:
parent
6cac60f32d
commit
1b486aafb2
@ -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);
|
||||
|
||||
|
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user