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

Add "Reset To Defaults" button to Stabilization configuration tab

Also add tootips to Reset/Apply/Save buttons.
This commit is contained in:
Oleg Semyonov 2012-01-02 14:21:01 +02:00 committed by David Ankers
parent c5a2afcc2c
commit 369629ad34
3 changed files with 863 additions and 792 deletions

View File

@ -42,8 +42,7 @@ ConfigStabilizationWidget::ConfigStabilizationWidget(QWidget *parent) : ConfigTa
m_stabilization = new Ui_StabilizationWidget();
m_stabilization->setupUi(this);
setupButtons(m_stabilization->saveStabilizationToRAM,m_stabilization->saveStabilizationToSD);
setupButtons(m_stabilization->saveStabilizationToRAM, m_stabilization->saveStabilizationToSD);
addUAVObject("StabilizationSettings");
@ -71,8 +70,6 @@ ConfigStabilizationWidget::ConfigStabilizationWidget(QWidget *parent) : ConfigTa
connect(m_stabilization->pitchKi, SIGNAL(valueChanged(double)), this, SLOT(updatePitchKI(double)));
connect(m_stabilization->pitchILimit, SIGNAL(valueChanged(double)), this, SLOT(updatePitchILimit(double)));
// Connect the help button
connect(m_stabilization->stabilizationHelp, SIGNAL(clicked()), this, SLOT(openHelp()));
addWidget(m_stabilization->rateRollKp);
addWidget(m_stabilization->rateRollKi);
addWidget(m_stabilization->rateRollILimit);
@ -102,6 +99,9 @@ ConfigStabilizationWidget::ConfigStabilizationWidget(QWidget *parent) : ConfigTa
addWidget(m_stabilization->maximumYaw);
addWidget(m_stabilization->lowThrottleZeroIntegral);
// Connect buttons
connect(m_stabilization->stabilizationResetToDefaults, SIGNAL(clicked()), this, SLOT(resetToDefaults()));
connect(m_stabilization->stabilizationHelp, SIGNAL(clicked()), this, SLOT(openHelp()));
}
ConfigStabilizationWidget::~ConfigStabilizationWidget()
@ -195,21 +195,17 @@ void ConfigStabilizationWidget::updatePitchILimit(double val)
}
}
/*******************************
* Stabilization Settings
*****************************/
/**
Request stabilization settings from the board
* Refresh UI with new settings of StabilizationSettings object
* (either from active configuration or just loaded defaults
* to be applied or saved)
*/
void ConfigStabilizationWidget::refreshWidgetsValues()
void ConfigStabilizationWidget::refreshUIValues(StabilizationSettings::DataFields &stabData)
{
bool dirty=isDirty();
// Not needed anymore as this slot is only called whenever we get
// a signal that the object was just updated
// stabSettings->requestUpdate();
StabilizationSettings::DataFields stabData = stabSettings->getData();
// Now fill in all the fields, this is fairly tedious:
m_stabilization->rateRollKp->setValue(stabData.RollRatePID[StabilizationSettings::ROLLRATEPID_KP]);
m_stabilization->rateRollKi->setValue(stabData.RollRatePID[StabilizationSettings::ROLLRATEPID_KI]);
@ -247,15 +243,25 @@ void ConfigStabilizationWidget::refreshWidgetsValues()
m_stabilization->maximumPitch->setValue(stabData.MaximumRate[StabilizationSettings::MAXIMUMRATE_PITCH]);
m_stabilization->maximumYaw->setValue(stabData.MaximumRate[StabilizationSettings::MAXIMUMRATE_YAW]);
m_stabilization->lowThrottleZeroIntegral->setChecked(stabData.LowThrottleZeroIntegral==StabilizationSettings::LOWTHROTTLEZEROINTEGRAL_TRUE ? true : false);
setDirty(dirty);
}
/**
Request stabilization settings from the board
*/
void ConfigStabilizationWidget::refreshWidgetsValues()
{
bool dirty=isDirty();
// Not needed anymore as this slot is only called whenever we get
// a signal that the object was just updated
// stabSettings->requestUpdate();
StabilizationSettings::DataFields stabData = stabSettings->getData();
refreshUIValues(stabData);
setDirty(dirty);
}
/**
Send telemetry settings to the board
*/
void ConfigStabilizationWidget::updateObjectsFromWidgets()
{
StabilizationSettings::DataFields stabData = stabSettings->getData();
@ -298,7 +304,6 @@ void ConfigStabilizationWidget::updateObjectsFromWidgets()
stabData.LowThrottleZeroIntegral = (m_stabilization->lowThrottleZeroIntegral->isChecked() ? StabilizationSettings::LOWTHROTTLEZEROINTEGRAL_TRUE :StabilizationSettings::LOWTHROTTLEZEROINTEGRAL_FALSE);
stabSettings->setData(stabData); // this is atomic
}
@ -311,9 +316,16 @@ void ConfigStabilizationWidget::realtimeUpdateToggle(bool state)
}
}
void ConfigStabilizationWidget::openHelp()
void ConfigStabilizationWidget::resetToDefaults()
{
QDesktopServices::openUrl( QUrl("http://wiki.openpilot.org/display/Doc/Stabilization+panel", QUrl::StrictMode) );
StabilizationSettings stabDefaults;
StabilizationSettings::DataFields defaults = stabDefaults.getData();
bool dirty=isDirty();
refreshUIValues(defaults);
setDirty(dirty);
}
void ConfigStabilizationWidget::openHelp()
{
QDesktopServices::openUrl( QUrl("http://wiki.openpilot.org/display/Doc/Stabilization+panel", QUrl::StrictMode) );
}

View File

@ -49,11 +49,13 @@ private:
Ui_StabilizationWidget *m_stabilization;
StabilizationSettings* stabSettings;
QTimer updateTimer;
void refreshUIValues(StabilizationSettings::DataFields &stabData);
private slots:
virtual void refreshWidgetsValues();
void updateObjectsFromWidgets();
void realtimeUpdateToggle(bool);
void resetToDefaults();
void openHelp();
void updateRateRollKP(double);
@ -73,4 +75,4 @@ private slots:
void updatePitchILimit(double);
};
#endif // ConfigStabilizationWidget_H
#endif // CONFIGSTABILIZATIONWIDGET_H

View File

@ -1,772 +1,829 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>StabilizationWidget</class>
<widget class="QWidget" name="StabilizationWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>683</width>
<height>685</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QScrollArea" name="scrollArea">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>1</verstretch>
</sizepolicy>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>665</width>
<height>627</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QGroupBox" name="groupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>150</height>
</size>
</property>
<property name="title">
<string>Rate Stabilization Coefficients (Inner Loop)</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="2">
<widget class="QLabel" name="label_12">
<property name="text">
<string>Kp</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QLabel" name="label_13">
<property name="text">
<string>Ki</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="4">
<widget class="QLabel" name="label_14">
<property name="text">
<string>ILimit</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_10">
<property name="text">
<string>Roll</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QDoubleSpinBox" name="rateRollKp">
<property name="toolTip">
<string>Slowly raise Kp until you start seeing clear oscillations when you fly.
Then lower the value by 20% or so.</string>
</property>
<property name="decimals">
<number>6</number>
</property>
<property name="singleStep">
<double>0.000100000000000</double>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QDoubleSpinBox" name="rateRollKi">
<property name="toolTip">
<string>I factor for rate stabilization is usually very low or even zero.</string>
</property>
<property name="decimals">
<number>6</number>
</property>
<property name="singleStep">
<double>0.000100000000000</double>
</property>
</widget>
</item>
<item row="1" column="4">
<widget class="QDoubleSpinBox" name="rateRollILimit">
<property name="decimals">
<number>6</number>
</property>
<property name="singleStep">
<double>0.000100000000000</double>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="linkRateRP">
<property name="toolTip">
<string>If checked, the Roll and Pitch factors will be identical.
When you change one, the other is updated.</string>
</property>
<property name="text">
<string>Link</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="label_11">
<property name="text">
<string>Pitch</string>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QDoubleSpinBox" name="ratePitchKp">
<property name="toolTip">
<string>Slowly raise Kp until you start seeing clear oscillations when you fly.
Then lower the value by 20% or so.</string>
</property>
<property name="decimals">
<number>6</number>
</property>
<property name="singleStep">
<double>0.000100000000000</double>
</property>
</widget>
</item>
<item row="2" column="3">
<widget class="QDoubleSpinBox" name="ratePitchKi">
<property name="toolTip">
<string>I factor for rate stabilization is usually very low or even zero.</string>
</property>
<property name="decimals">
<number>6</number>
</property>
<property name="singleStep">
<double>0.000100000000000</double>
</property>
</widget>
</item>
<item row="2" column="4">
<widget class="QDoubleSpinBox" name="ratePitchILimit">
<property name="decimals">
<number>6</number>
</property>
<property name="singleStep">
<double>0.000100000000000</double>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="label_15">
<property name="text">
<string>Yaw</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QDoubleSpinBox" name="rateYawKp">
<property name="toolTip">
<string>Slowly raise Kp until you start seeing clear oscillations when you fly.
Then lower the value by 20% or so.
You can usually go for higher values for Yaw factors.</string>
</property>
<property name="decimals">
<number>6</number>
</property>
<property name="singleStep">
<double>0.000100000000000</double>
</property>
</widget>
</item>
<item row="3" column="3">
<widget class="QDoubleSpinBox" name="rateYawKi">
<property name="toolTip">
<string>As a rule of thumb, you can set YawRate Ki at roughly the same
value as YawRate Kp.</string>
</property>
<property name="decimals">
<number>6</number>
</property>
<property name="singleStep">
<double>0.000100000000000</double>
</property>
</widget>
</item>
<item row="3" column="4">
<widget class="QDoubleSpinBox" name="rateYawILimit">
<property name="decimals">
<number>6</number>
</property>
<property name="singleStep">
<double>0.000100000000000</double>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>13</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>150</height>
</size>
</property>
<property name="title">
<string>Attitude Stabization Coefficients (Outer Loop)</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="3" column="2">
<widget class="QDoubleSpinBox" name="rollKp">
<property name="toolTip">
<string>Once Rate stabilization is done, you should increase the Kp factor until the airframe oscillates again, and go back down 20% or so.
</string>
</property>
<property name="decimals">
<number>6</number>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
</widget>
</item>
<item row="3" column="3">
<widget class="QDoubleSpinBox" name="rollKi">
<property name="toolTip">
<string>Ki can usually be almost identical to Kp.</string>
</property>
<property name="decimals">
<number>6</number>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
</widget>
</item>
<item row="3" column="4">
<widget class="QDoubleSpinBox" name="rollILimit">
<property name="toolTip">
<string>ILimit can be equal to three to four times Ki, but you can adjust
depending on whether your airframe is well balanced, and your
flying style.</string>
</property>
<property name="decimals">
<number>6</number>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QLabel" name="label_19">
<property name="text">
<string>Kp</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="2" column="3">
<widget class="QLabel" name="label_20">
<property name="text">
<string>Ki</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="2" column="4">
<widget class="QLabel" name="label_21">
<property name="text">
<string>ILimit</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="7" column="4">
<widget class="QDoubleSpinBox" name="yawILimit">
<property name="toolTip">
<string>ILimit can be equal to three to four times Ki, but you can adjust
depending on whether your airframe is well balanced, and your
flying style.</string>
</property>
<property name="decimals">
<number>6</number>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
</widget>
</item>
<item row="7" column="3">
<widget class="QDoubleSpinBox" name="yawKi">
<property name="toolTip">
<string>Ki can usually be almost identical to Kp.</string>
</property>
<property name="decimals">
<number>6</number>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
</widget>
</item>
<item row="7" column="2">
<widget class="QDoubleSpinBox" name="yawKp">
<property name="toolTip">
<string>Once Rate stabilization is done, you should increase the Kp factor until the airframe oscillates again, and go back down 20% or so.
</string>
</property>
<property name="decimals">
<number>6</number>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
</widget>
</item>
<item row="6" column="2">
<widget class="QDoubleSpinBox" name="pitchKp">
<property name="toolTip">
<string>Once Rate stabilization is done, you should increase the Kp factor until the airframe oscillates again, and go back down 20% or so.
</string>
</property>
<property name="decimals">
<number>6</number>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QLabel" name="label_18">
<property name="text">
<string>Yaw</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QLabel" name="label_17">
<property name="text">
<string>Pitch</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="label_16">
<property name="text">
<string>Roll</string>
</property>
</widget>
</item>
<item row="6" column="3">
<widget class="QDoubleSpinBox" name="pitchKi">
<property name="toolTip">
<string>Ki can usually be almost identical to Kp.</string>
</property>
<property name="decimals">
<number>6</number>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
</widget>
</item>
<item row="6" column="4">
<widget class="QDoubleSpinBox" name="pitchILimit">
<property name="toolTip">
<string>ILimit can be equal to three to four times Ki, but you can adjust
depending on whether your airframe is well balanced, and your
flying style.</string>
</property>
<property name="decimals">
<number>6</number>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QCheckBox" name="linkAttitudeRP">
<property name="toolTip">
<string>If checked, the Roll and Pitch factors will be identical.
When you change one, the other is updated.</string>
</property>
<property name="text">
<string>Link</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>13</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QGroupBox" name="groupBox_3">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="title">
<string>Stick range and limits</string>
</property>
<layout class="QGridLayout" name="gridLayout" rowminimumheight="5,5,5,5">
<property name="sizeConstraint">
<enum>QLayout::SetMinAndMaxSize</enum>
</property>
<item row="0" column="1">
<widget class="QLabel" name="label">
<property name="text">
<string>Roll</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="label_22">
<property name="text">
<string>Pitch</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QLabel" name="label_23">
<property name="text">
<string>Yaw</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QSpinBox" name="rollMax">
<property name="maximum">
<number>180</number>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QSpinBox" name="pitchMax">
<property name="maximum">
<number>180</number>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QSpinBox" name="yawMax">
<property name="maximum">
<number>180</number>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_5">
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="font">
<font>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="text">
<string>Full stick angle (deg)</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_6">
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="font">
<font>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="text">
<string>Full stick rate (deg/s)</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QSpinBox" name="manualRoll">
<property name="maximum">
<number>500</number>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QSpinBox" name="manualPitch">
<property name="maximum">
<number>500</number>
</property>
</widget>
</item>
<item row="2" column="3">
<widget class="QSpinBox" name="manualYaw">
<property name="maximum">
<number>500</number>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_24">
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="font">
<font>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="toolTip">
<string notr="true"/>
</property>
<property name="text">
<string>Maximum rate in attitude mode (deg/s)</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QSpinBox" name="maximumRoll">
<property name="maximum">
<number>500</number>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QSpinBox" name="maximumPitch">
<property name="maximum">
<number>500</number>
</property>
</widget>
</item>
<item row="3" column="3">
<widget class="QSpinBox" name="maximumYaw">
<property name="maximum">
<number>500</number>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QCheckBox" name="lowThrottleZeroIntegral">
<property name="text">
<string>Zero the integral when throttle is low</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QCheckBox" name="realTimeUpdates">
<property name="toolTip">
<string>If you check this, the GCS will udpate the stabilization factors
automatically every 300ms, which will help for fast tuning.</string>
</property>
<property name="text">
<string>Update in real time</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="stabilizationHelp">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../coreplugin/core.qrc">
<normaloff>:/core/images/helpicon.svg</normaloff>:/core/images/helpicon.svg</iconset>
</property>
<property name="iconSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="saveStabilizationToRAM">
<property name="text">
<string>Apply</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="saveStabilizationToSD">
<property name="text">
<string>Save</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<resources>
<include location="../coreplugin/core.qrc"/>
</resources>
<connections/>
</ui>
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>StabilizationWidget</class>
<widget class="QWidget" name="StabilizationWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>683</width>
<height>685</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QScrollArea" name="scrollArea">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>1</verstretch>
</sizepolicy>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>665</width>
<height>627</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QGroupBox" name="groupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>150</height>
</size>
</property>
<property name="title">
<string>Rate Stabilization Coefficients (Inner Loop)</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="2">
<widget class="QLabel" name="label_12">
<property name="text">
<string>Kp</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QLabel" name="label_13">
<property name="text">
<string>Ki</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="4">
<widget class="QLabel" name="label_14">
<property name="text">
<string>ILimit</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_10">
<property name="text">
<string>Roll</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QDoubleSpinBox" name="rateRollKp">
<property name="toolTip">
<string>Slowly raise Kp until you start seeing clear oscillations when you fly.
Then lower the value by 20% or so.</string>
</property>
<property name="decimals">
<number>6</number>
</property>
<property name="singleStep">
<double>0.000100000000000</double>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QDoubleSpinBox" name="rateRollKi">
<property name="toolTip">
<string>I factor for rate stabilization is usually very low or even zero.</string>
</property>
<property name="decimals">
<number>6</number>
</property>
<property name="singleStep">
<double>0.000100000000000</double>
</property>
</widget>
</item>
<item row="1" column="4">
<widget class="QDoubleSpinBox" name="rateRollILimit">
<property name="decimals">
<number>6</number>
</property>
<property name="singleStep">
<double>0.000100000000000</double>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="linkRateRP">
<property name="toolTip">
<string>If checked, the Roll and Pitch factors will be identical.
When you change one, the other is updated.</string>
</property>
<property name="text">
<string>Link</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="label_11">
<property name="text">
<string>Pitch</string>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QDoubleSpinBox" name="ratePitchKp">
<property name="toolTip">
<string>Slowly raise Kp until you start seeing clear oscillations when you fly.
Then lower the value by 20% or so.</string>
</property>
<property name="decimals">
<number>6</number>
</property>
<property name="singleStep">
<double>0.000100000000000</double>
</property>
</widget>
</item>
<item row="2" column="3">
<widget class="QDoubleSpinBox" name="ratePitchKi">
<property name="toolTip">
<string>I factor for rate stabilization is usually very low or even zero.</string>
</property>
<property name="decimals">
<number>6</number>
</property>
<property name="singleStep">
<double>0.000100000000000</double>
</property>
</widget>
</item>
<item row="2" column="4">
<widget class="QDoubleSpinBox" name="ratePitchILimit">
<property name="decimals">
<number>6</number>
</property>
<property name="singleStep">
<double>0.000100000000000</double>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="label_15">
<property name="text">
<string>Yaw</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QDoubleSpinBox" name="rateYawKp">
<property name="toolTip">
<string>Slowly raise Kp until you start seeing clear oscillations when you fly.
Then lower the value by 20% or so.
You can usually go for higher values for Yaw factors.</string>
</property>
<property name="decimals">
<number>6</number>
</property>
<property name="singleStep">
<double>0.000100000000000</double>
</property>
</widget>
</item>
<item row="3" column="3">
<widget class="QDoubleSpinBox" name="rateYawKi">
<property name="toolTip">
<string>As a rule of thumb, you can set YawRate Ki at roughly the same
value as YawRate Kp.</string>
</property>
<property name="decimals">
<number>6</number>
</property>
<property name="singleStep">
<double>0.000100000000000</double>
</property>
</widget>
</item>
<item row="3" column="4">
<widget class="QDoubleSpinBox" name="rateYawILimit">
<property name="decimals">
<number>6</number>
</property>
<property name="singleStep">
<double>0.000100000000000</double>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>13</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>150</height>
</size>
</property>
<property name="title">
<string>Attitude Stabization Coefficients (Outer Loop)</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="3" column="2">
<widget class="QDoubleSpinBox" name="rollKp">
<property name="toolTip">
<string>Once Rate stabilization is done, you should increase the Kp factor until the airframe oscillates again, and go back down 20% or so.
</string>
</property>
<property name="decimals">
<number>6</number>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
</widget>
</item>
<item row="3" column="3">
<widget class="QDoubleSpinBox" name="rollKi">
<property name="toolTip">
<string>Ki can usually be almost identical to Kp.</string>
</property>
<property name="decimals">
<number>6</number>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
</widget>
</item>
<item row="3" column="4">
<widget class="QDoubleSpinBox" name="rollILimit">
<property name="toolTip">
<string>ILimit can be equal to three to four times Ki, but you can adjust
depending on whether your airframe is well balanced, and your
flying style.</string>
</property>
<property name="decimals">
<number>6</number>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QLabel" name="label_19">
<property name="text">
<string>Kp</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="2" column="3">
<widget class="QLabel" name="label_20">
<property name="text">
<string>Ki</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="2" column="4">
<widget class="QLabel" name="label_21">
<property name="text">
<string>ILimit</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="7" column="4">
<widget class="QDoubleSpinBox" name="yawILimit">
<property name="toolTip">
<string>ILimit can be equal to three to four times Ki, but you can adjust
depending on whether your airframe is well balanced, and your
flying style.</string>
</property>
<property name="decimals">
<number>6</number>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
</widget>
</item>
<item row="7" column="3">
<widget class="QDoubleSpinBox" name="yawKi">
<property name="toolTip">
<string>Ki can usually be almost identical to Kp.</string>
</property>
<property name="decimals">
<number>6</number>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
</widget>
</item>
<item row="7" column="2">
<widget class="QDoubleSpinBox" name="yawKp">
<property name="toolTip">
<string>Once Rate stabilization is done, you should increase the Kp factor until the airframe oscillates again, and go back down 20% or so.
</string>
</property>
<property name="decimals">
<number>6</number>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
</widget>
</item>
<item row="6" column="2">
<widget class="QDoubleSpinBox" name="pitchKp">
<property name="toolTip">
<string>Once Rate stabilization is done, you should increase the Kp factor until the airframe oscillates again, and go back down 20% or so.
</string>
</property>
<property name="decimals">
<number>6</number>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QLabel" name="label_18">
<property name="text">
<string>Yaw</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QLabel" name="label_17">
<property name="text">
<string>Pitch</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="label_16">
<property name="text">
<string>Roll</string>
</property>
</widget>
</item>
<item row="6" column="3">
<widget class="QDoubleSpinBox" name="pitchKi">
<property name="toolTip">
<string>Ki can usually be almost identical to Kp.</string>
</property>
<property name="decimals">
<number>6</number>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
</widget>
</item>
<item row="6" column="4">
<widget class="QDoubleSpinBox" name="pitchILimit">
<property name="toolTip">
<string>ILimit can be equal to three to four times Ki, but you can adjust
depending on whether your airframe is well balanced, and your
flying style.</string>
</property>
<property name="decimals">
<number>6</number>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QCheckBox" name="linkAttitudeRP">
<property name="toolTip">
<string>If checked, the Roll and Pitch factors will be identical.
When you change one, the other is updated.</string>
</property>
<property name="text">
<string>Link</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>13</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QGroupBox" name="groupBox_3">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="title">
<string>Stick range and limits</string>
</property>
<layout class="QGridLayout" name="gridLayout" rowminimumheight="5,5,5,5">
<property name="sizeConstraint">
<enum>QLayout::SetMinAndMaxSize</enum>
</property>
<item row="0" column="1">
<widget class="QLabel" name="label">
<property name="text">
<string>Roll</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="label_22">
<property name="text">
<string>Pitch</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QLabel" name="label_23">
<property name="text">
<string>Yaw</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QSpinBox" name="rollMax">
<property name="maximum">
<number>180</number>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QSpinBox" name="pitchMax">
<property name="maximum">
<number>180</number>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QSpinBox" name="yawMax">
<property name="maximum">
<number>180</number>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_5">
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="font">
<font>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="text">
<string>Full stick angle (deg)</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_6">
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="font">
<font>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="text">
<string>Full stick rate (deg/s)</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QSpinBox" name="manualRoll">
<property name="maximum">
<number>500</number>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QSpinBox" name="manualPitch">
<property name="maximum">
<number>500</number>
</property>
</widget>
</item>
<item row="2" column="3">
<widget class="QSpinBox" name="manualYaw">
<property name="maximum">
<number>500</number>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_24">
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="font">
<font>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="toolTip">
<string notr="true"/>
</property>
<property name="text">
<string>Maximum rate in attitude mode (deg/s)</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QSpinBox" name="maximumRoll">
<property name="maximum">
<number>500</number>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QSpinBox" name="maximumPitch">
<property name="maximum">
<number>500</number>
</property>
</widget>
</item>
<item row="3" column="3">
<widget class="QSpinBox" name="maximumYaw">
<property name="maximum">
<number>500</number>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QCheckBox" name="lowThrottleZeroIntegral">
<property name="text">
<string>Zero the integral when throttle is low</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QCheckBox" name="realTimeUpdates">
<property name="toolTip">
<string>If you check this, the GCS will udpate the stabilization factors
automatically every 300ms, which will help for fast tuning.</string>
</property>
<property name="text">
<string>Update in real time</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="stabilizationHelp">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../coreplugin/core.qrc">
<normaloff>:/core/images/helpicon.svg</normaloff>:/core/images/helpicon.svg</iconset>
</property>
<property name="iconSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="stabilizationResetToDefaults">
<property name="toolTip">
<string>Load default Stabilization settings
Loaded settings are not applied automatically. You have to click the
Apply or Save button afterwards.</string>
</property>
<property name="text">
<string>Reset To Defaults</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="saveStabilizationToRAM">
<property name="toolTip">
<string>Send settings to the board but do not save to the non-volatile memory</string>
</property>
<property name="text">
<string>Apply</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="saveStabilizationToSD">
<property name="toolTip">
<string>Send settings to the board and save to the non-volatile memory</string>
</property>
<property name="text">
<string>Save</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<tabstops>
<tabstop>scrollArea</tabstop>
<tabstop>rateRollKp</tabstop>
<tabstop>rateRollKi</tabstop>
<tabstop>rateRollILimit</tabstop>
<tabstop>linkRateRP</tabstop>
<tabstop>ratePitchKp</tabstop>
<tabstop>ratePitchKi</tabstop>
<tabstop>ratePitchILimit</tabstop>
<tabstop>rateYawKp</tabstop>
<tabstop>rateYawKi</tabstop>
<tabstop>rateYawILimit</tabstop>
<tabstop>rollKp</tabstop>
<tabstop>rollKi</tabstop>
<tabstop>rollILimit</tabstop>
<tabstop>linkAttitudeRP</tabstop>
<tabstop>pitchKp</tabstop>
<tabstop>pitchKi</tabstop>
<tabstop>pitchILimit</tabstop>
<tabstop>yawKp</tabstop>
<tabstop>yawKi</tabstop>
<tabstop>yawILimit</tabstop>
<tabstop>rollMax</tabstop>
<tabstop>pitchMax</tabstop>
<tabstop>yawMax</tabstop>
<tabstop>manualRoll</tabstop>
<tabstop>manualPitch</tabstop>
<tabstop>manualYaw</tabstop>
<tabstop>maximumRoll</tabstop>
<tabstop>maximumPitch</tabstop>
<tabstop>maximumYaw</tabstop>
<tabstop>lowThrottleZeroIntegral</tabstop>
<tabstop>realTimeUpdates</tabstop>
<tabstop>stabilizationHelp</tabstop>
<tabstop>stabilizationResetToDefaults</tabstop>
<tabstop>saveStabilizationToRAM</tabstop>
<tabstop>saveStabilizationToSD</tabstop>
</tabstops>
<resources>
<include location="../coreplugin/core.qrc"/>
</resources>
<connections/>
</ui>