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 = new Ui_StabilizationWidget();
m_stabilization->setupUi(this); m_stabilization->setupUi(this);
setupButtons(m_stabilization->saveStabilizationToRAM, m_stabilization->saveStabilizationToSD);
setupButtons(m_stabilization->saveStabilizationToRAM,m_stabilization->saveStabilizationToSD);
addUAVObject("StabilizationSettings"); 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->pitchKi, SIGNAL(valueChanged(double)), this, SLOT(updatePitchKI(double)));
connect(m_stabilization->pitchILimit, SIGNAL(valueChanged(double)), this, SLOT(updatePitchILimit(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->rateRollKp);
addWidget(m_stabilization->rateRollKi); addWidget(m_stabilization->rateRollKi);
addWidget(m_stabilization->rateRollILimit); addWidget(m_stabilization->rateRollILimit);
@ -102,6 +99,9 @@ ConfigStabilizationWidget::ConfigStabilizationWidget(QWidget *parent) : ConfigTa
addWidget(m_stabilization->maximumYaw); addWidget(m_stabilization->maximumYaw);
addWidget(m_stabilization->lowThrottleZeroIntegral); 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() ConfigStabilizationWidget::~ConfigStabilizationWidget()
@ -195,21 +195,17 @@ void ConfigStabilizationWidget::updatePitchILimit(double val)
} }
} }
/******************************* /*******************************
* Stabilization Settings * 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: // Now fill in all the fields, this is fairly tedious:
m_stabilization->rateRollKp->setValue(stabData.RollRatePID[StabilizationSettings::ROLLRATEPID_KP]); m_stabilization->rateRollKp->setValue(stabData.RollRatePID[StabilizationSettings::ROLLRATEPID_KP]);
m_stabilization->rateRollKi->setValue(stabData.RollRatePID[StabilizationSettings::ROLLRATEPID_KI]); 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->maximumPitch->setValue(stabData.MaximumRate[StabilizationSettings::MAXIMUMRATE_PITCH]);
m_stabilization->maximumYaw->setValue(stabData.MaximumRate[StabilizationSettings::MAXIMUMRATE_YAW]); m_stabilization->maximumYaw->setValue(stabData.MaximumRate[StabilizationSettings::MAXIMUMRATE_YAW]);
m_stabilization->lowThrottleZeroIntegral->setChecked(stabData.LowThrottleZeroIntegral==StabilizationSettings::LOWTHROTTLEZEROINTEGRAL_TRUE ? true : false); 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 Send telemetry settings to the board
*/ */
void ConfigStabilizationWidget::updateObjectsFromWidgets() void ConfigStabilizationWidget::updateObjectsFromWidgets()
{ {
StabilizationSettings::DataFields stabData = stabSettings->getData(); StabilizationSettings::DataFields stabData = stabSettings->getData();
@ -298,7 +304,6 @@ void ConfigStabilizationWidget::updateObjectsFromWidgets()
stabData.LowThrottleZeroIntegral = (m_stabilization->lowThrottleZeroIntegral->isChecked() ? StabilizationSettings::LOWTHROTTLEZEROINTEGRAL_TRUE :StabilizationSettings::LOWTHROTTLEZEROINTEGRAL_FALSE); stabData.LowThrottleZeroIntegral = (m_stabilization->lowThrottleZeroIntegral->isChecked() ? StabilizationSettings::LOWTHROTTLEZEROINTEGRAL_TRUE :StabilizationSettings::LOWTHROTTLEZEROINTEGRAL_FALSE);
stabSettings->setData(stabData); // this is atomic stabSettings->setData(stabData); // this is atomic
} }
@ -311,9 +316,16 @@ void ConfigStabilizationWidget::realtimeUpdateToggle(bool state)
} }
} }
void ConfigStabilizationWidget::openHelp() void ConfigStabilizationWidget::resetToDefaults()
{ {
StabilizationSettings stabDefaults;
QDesktopServices::openUrl( QUrl("http://wiki.openpilot.org/display/Doc/Stabilization+panel", QUrl::StrictMode) ); 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; Ui_StabilizationWidget *m_stabilization;
StabilizationSettings* stabSettings; StabilizationSettings* stabSettings;
QTimer updateTimer; QTimer updateTimer;
void refreshUIValues(StabilizationSettings::DataFields &stabData);
private slots: private slots:
virtual void refreshWidgetsValues(); virtual void refreshWidgetsValues();
void updateObjectsFromWidgets(); void updateObjectsFromWidgets();
void realtimeUpdateToggle(bool); void realtimeUpdateToggle(bool);
void resetToDefaults();
void openHelp(); void openHelp();
void updateRateRollKP(double); void updateRateRollKP(double);
@ -73,4 +75,4 @@ private slots:
void updatePitchILimit(double); void updatePitchILimit(double);
}; };
#endif // ConfigStabilizationWidget_H #endif // CONFIGSTABILIZATIONWIDGET_H

View File

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