diff --git a/ground/gcs/src/plugins/config/configstabilizationwidget.cpp b/ground/gcs/src/plugins/config/configstabilizationwidget.cpp index 827b2125e..7fd06a786 100644 --- a/ground/gcs/src/plugins/config/configstabilizationwidget.cpp +++ b/ground/gcs/src/plugins/config/configstabilizationwidget.cpp @@ -245,8 +245,22 @@ void ConfigStabilizationWidget::refreshWidgetsValues(UAVObject *o) updateThrottleCurveFromObject(); - ui->basicResponsivenessCheckBox->setChecked(ui->rateRollKp_3->value() == ui->ratePitchKp_4->value() && - ui->rateRollKi_3->value() == ui->ratePitchKi_4->value()); + // Check and update basic/advanced checkboxes only if something connected + // Jump to advanced tab if something not "basic": Rate value out of slider limits or different Pitch/Roll values + if (ui->lowThrottleZeroIntegral_8->isEnabled()) { + if ((ui->attitudeRollResponse->value() == ui->attitudePitchResponse->value()) && + (ui->rateRollResponse->value() == ui->ratePitchResponse->value()) && + (ui->rateRollResponse->value() <= ui->RateResponsivenessSlider->maximum()) && + (ui->ratePitchResponse->value() <= ui->RateResponsivenessSlider->maximum())) { + ui->basicResponsivenessCheckBox->setChecked(true); + ui->advancedResponsivenessCheckBox->setChecked(false); + ui->tabWidget->setCurrentIndex(0); + } else { + ui->basicResponsivenessCheckBox->setChecked(false); + ui->advancedResponsivenessCheckBox->setChecked(true); + ui->tabWidget->setCurrentIndex(1); + } + } } void ConfigStabilizationWidget::updateObjectsFromWidgets() @@ -611,9 +625,11 @@ void ConfigStabilizationWidget::processLinkedWidgets(QWidget *widget) if (ui->basicResponsivenessCheckBox->isChecked()) { if (widget == ui->AttitudeResponsivenessSlider) { - ui->ratePitchKp_4->setValue(ui->AttitudeResponsivenessSlider->value()); + ui->attitudePitchResponse->setValue(ui->AttitudeResponsivenessSlider->value()); + ui->attitudeRollResponse->setValue(ui->AttitudeResponsivenessSlider->value()); } else if (widget == ui->RateResponsivenessSlider) { - ui->ratePitchKi_4->setValue(ui->RateResponsivenessSlider->value()); + ui->ratePitchResponse->setValue(ui->RateResponsivenessSlider->value()); + ui->rateRollResponse->setValue(ui->RateResponsivenessSlider->value()); } } if (ui->checkBoxLinkAcroFactors->isChecked()) { diff --git a/ground/gcs/src/plugins/config/stabilization.ui b/ground/gcs/src/plugins/config/stabilization.ui index 811b6735d..2dad4132f 100644 --- a/ground/gcs/src/plugins/config/stabilization.ui +++ b/ground/gcs/src/plugins/config/stabilization.ui @@ -195,29 +195,28 @@ margin-top: -1px; Acro+ - - - - - - 0 - 0 - - - - Qt::StrongFocus - - - <html><head/><body><p>Link roll &amp; pitch sliders to move together</p></body></html> - - - - - - Link Roll and Pitch - - - + + + + + 0 + 0 + + + + Qt::StrongFocus + + + <html><head/><body><p>Link roll &amp; pitch sliders to move together</p></body></html> + + + + + + Link Roll and Pitch + + + @@ -1002,7 +1001,7 @@ margin-top: -1px; Use Basic Configuration - true + false @@ -1036,7 +1035,7 @@ margin-top: -1px; 100 - 800 + 5000 400 @@ -2296,7 +2295,7 @@ border-radius: 5; 100 - 800 + 5000 400 @@ -9504,7 +9503,7 @@ border-radius: 5; - + 0 @@ -9584,7 +9583,7 @@ response (deg/s) - + 0 @@ -9637,7 +9636,7 @@ response (deg/s) - + 0 @@ -9703,58 +9702,6 @@ response (deg) - - - - - 0 - 0 - - - - - 0 - 22 - - - - - 16777215 - 22 - - - - Qt::StrongFocus - - - <html><head/><body><p>This sets the maximum deg your vehicle will tilt at full stick input when in Attitude mode.</p></body></html> - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - 0 - - - 180.000000000000000 - - - 1.000000000000000 - - - - objname:StabilizationSettingsBankX - fieldname:YawMax - haslimits:no - scale:1 - buttongroup:6,20 - - - - @@ -10306,7 +10253,7 @@ border-radius: 5; - + 0 @@ -10909,7 +10856,7 @@ border-radius: 5; - + 0 @@ -10964,7 +10911,7 @@ border-radius: 5; - + 0 @@ -11017,7 +10964,7 @@ border-radius: 5; - + 0 @@ -11070,7 +11017,7 @@ border-radius: 5; - + 0 @@ -16169,7 +16116,7 @@ border-radius: 5; - + 0 @@ -16229,56 +16176,6 @@ border-radius: 5; - - - - - 0 - 0 - - - - - 85 - 22 - - - - - 16777215 - 22 - - - - Qt::StrongFocus - - - <html><head/><body><p>This adjusts how much leveling stability is set into Attitude mode (outer loop). Too much will make your vehicle oscillate in Attitude Mode.</p></body></html> - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - 3 - - - 0.100000000000000 - - - - objname:StabilizationSettingsBankX - fieldname:YawPI - element:Kp - haslimits:no - scale:1 - buttongroup:5,20 - - - - @@ -16904,606 +16801,6 @@ border-radius: 5; - - - - - 0 - 0 - - - - - 0 - 20 - - - - - - - - - 255 - 255 - 255 - - - - - - - - - 74 - 74 - 74 - - - - - 36 - 36 - 36 - - - - - - - - - 58 - 58 - 58 - - - - - - - 48 - 48 - 48 - - - - - - - 19 - 19 - 19 - - - - - - - 26 - 26 - 26 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - - - 74 - 74 - 74 - - - - - 36 - 36 - 36 - - - - - - - - - - - 74 - 74 - 74 - - - - - 36 - 36 - 36 - - - - - - - - - 0 - 0 - 0 - - - - - - - 19 - 19 - 19 - - - - - - - 255 - 255 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - - - 255 - 255 - 255 - - - - - - - - - 74 - 74 - 74 - - - - - 36 - 36 - 36 - - - - - - - - - 58 - 58 - 58 - - - - - - - 48 - 48 - 48 - - - - - - - 19 - 19 - 19 - - - - - - - 26 - 26 - 26 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - - - 74 - 74 - 74 - - - - - 36 - 36 - 36 - - - - - - - - - - - 74 - 74 - 74 - - - - - 36 - 36 - 36 - - - - - - - - - 0 - 0 - 0 - - - - - - - 19 - 19 - 19 - - - - - - - 255 - 255 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - - - 255 - 255 - 255 - - - - - - - - - 74 - 74 - 74 - - - - - 36 - 36 - 36 - - - - - - - - - 58 - 58 - 58 - - - - - - - 48 - 48 - 48 - - - - - - - 19 - 19 - 19 - - - - - - - 26 - 26 - 26 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - - - 74 - 74 - 74 - - - - - 36 - 36 - 36 - - - - - - - - - - - 74 - 74 - 74 - - - - - 36 - 36 - 36 - - - - - - - - - 0 - 0 - 0 - - - - - - - 39 - 39 - 39 - - - - - - - 255 - 255 - 220 - - - - - - - 0 - 0 - 0 - - - - - - - - - 75 - true - - - - false - - - background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255)); -color: rgb(255, 255, 255); -border-radius: 5; - - - Yaw - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - - 0 - 22 - - - - - 16777215 - 22 - - - - Qt::StrongFocus - - - <html><head/><body><p>This adjusts how much stability your vehicle will have when flying tilted (ie forward flight) in Attitude Mode. Adding Ki in Attitude when Ki is present in Rate is not recommended.</p></body></html> - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - 3 - - - 0.100000000000000 - - - - objname:StabilizationSettingsBankX - fieldname:YawPI - element:Ki - haslimits:no - scale:1 - buttongroup:5,20 - - - - @@ -27459,15 +26756,14 @@ Useful if you have accidentally changed some settings. scrollArea_2 advancedResponsivenessCheckBox pushButton_3 - rateRollKp_3 - ratePitchKp_4 - rateYawKp_3 - rateRollKi_3 - ratePitchKi_4 - rateYawKi_3 - rateRollILimit_3 - ratePitchILimit_4 - rateYawILimit_3 + attitudeRollResponse + attitudePitchResponse + rateRollResponse + ratePitchResponse + rateYawResponse + maxRateRollLimit + maxRatePitchLimit + maxRateYawLimit enableThrustPIDScalingCheckBox ThrustPIDSource ThrustPIDTarget @@ -27488,10 +26784,8 @@ Useful if you have accidentally changed some settings. pushButton_2 AttitudeRollKp AttitudePitchKp_2 - AttitudeYawKp AttitudeRollKi AttitudePitchKi_2 - AttitudeYawKi enableThrustPIDScalingCheckBox_2 pushButton_13 realTimeUpdates_12