mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-03-15 07:29:15 +01:00
LP-56 - Add link checkbox for acro+ roll/pitch factors
This commit is contained in:
parent
7b3aed3de9
commit
3490057f69
@ -91,6 +91,9 @@ ConfigStabilizationWidget::ConfigStabilizationWidget(QWidget *parent) : ConfigTa
|
||||
connect(ui->checkBox_3, SIGNAL(toggled(bool)), this, SLOT(linkCheckBoxes(bool)));
|
||||
addWidget(ui->checkBox_3);
|
||||
|
||||
connect(ui->checkBoxLinkAcroFactors, SIGNAL(toggled(bool)), this, SLOT(linkCheckBoxes(bool)));
|
||||
addWidget(ui->checkBoxLinkAcroFactors);
|
||||
|
||||
addWidget(ui->pushButton_2);
|
||||
addWidget(ui->pushButton_3);
|
||||
addWidget(ui->pushButton_4);
|
||||
@ -568,6 +571,8 @@ void ConfigStabilizationWidget::linkCheckBoxes(bool value)
|
||||
ui->basicResponsivenessCheckBox->setChecked(!value);
|
||||
ui->basicResponsivenessControls->setEnabled(!value);
|
||||
ui->advancedResponsivenessControls->setEnabled(value);
|
||||
} else if(sender() == ui->checkBoxLinkAcroFactors) {
|
||||
processLinkedWidgets(ui->AcroFactorRollSlider);
|
||||
}
|
||||
}
|
||||
|
||||
@ -608,6 +613,13 @@ void ConfigStabilizationWidget::processLinkedWidgets(QWidget *widget)
|
||||
ui->ratePitchKi_4->setValue(ui->RateResponsivenessSlider->value());
|
||||
}
|
||||
}
|
||||
if (ui->checkBoxLinkAcroFactors->isChecked()) {
|
||||
if (widget == ui->AcroFactorRollSlider) {
|
||||
ui->AcroFactorPitchSlider->setValue(ui->AcroFactorRollSlider->value());
|
||||
} else if (widget == ui->AcroFactorPitchSlider) {
|
||||
ui->AcroFactorRollSlider->setValue(ui->AcroFactorPitchSlider->value());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ConfigStabilizationWidget::onBoardConnected()
|
||||
|
@ -195,6 +195,29 @@ margin-top: -1px;
|
||||
<string>Acro+</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_26">
|
||||
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="checkBoxLinkAcroFactors">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Link roll &amp; pitch sliders to move together, thus giving same value for both roll &amp; pitch when setting up a symetrical vehicle that requires both to be the same</p></body></html></string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Link Roll and Pitch</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QPushButton" name="pushButton_21">
|
||||
<property name="sizePolicy">
|
||||
|
Loading…
x
Reference in New Issue
Block a user