1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-02 10:24:11 +01:00

Implemented stabilization tuning UI improvements as per OP-429.

This commit is contained in:
elafargue 2011-04-29 22:39:24 +02:00
parent 9e26d7edcc
commit 61e8df8b20
3 changed files with 531 additions and 575 deletions

View File

@ -49,7 +49,6 @@ ConfigStabilizationWidget::ConfigStabilizationWidget(QWidget *parent) : ConfigTa
connect(m_stabilization->saveStabilizationToSD, SIGNAL(clicked()), this, SLOT(saveStabilizationUpdate()));
connect(m_stabilization->saveStabilizationToRAM, SIGNAL(clicked()), this, SLOT(sendStabilizationUpdate()));
connect(m_stabilization->getStabilizationCurrent, SIGNAL(clicked()), this, SLOT(requestStabilizationUpdate()));
connect(m_stabilization->resetStabilizationToDefaults, SIGNAL(clicked()), this, SLOT(resetStabilizationToDefaults()));
connect(parent, SIGNAL(autopilotConnected()),this, SLOT(requestStabilizationUpdate()));
@ -269,10 +268,6 @@ void ConfigStabilizationWidget::saveStabilizationUpdate()
}
void ConfigStabilizationWidget::resetStabilizationToDefaults()
{
}
void ConfigStabilizationWidget::realtimeUpdateToggle(bool state)
{
if (state)

View File

@ -55,7 +55,6 @@ private slots:
void requestStabilizationUpdate();
void sendStabilizationUpdate();
void saveStabilizationUpdate();
void resetStabilizationToDefaults();
void realtimeUpdateToggle(bool);
void updateRateRollKP(double);

View File

@ -15,14 +15,7 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QTabWidget" name="piFactors">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="tab">
<attribute name="title">
<string>PI Factors</string>
</attribute>
<widget class="QFrame" name="piFactors">
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QVBoxLayout" name="verticalLayout">
@ -455,6 +448,96 @@ flying style.</string>
</layout>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QLabel" name="label_5">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Angle Limits:</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>RollMax</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="rollMax">
<property name="maximum">
<number>180</number>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_4">
<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="QLabel" name="label_2">
<property name="text">
<string>PitchMax</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="pitchMax">
<property name="maximum">
<number>180</number>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_5">
<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="QLabel" name="label_3">
<property name="text">
<string>YawMax</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="yawMax">
<property name="maximum">
<number>180</number>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
@ -468,6 +551,8 @@ flying style.</string>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QCheckBox" name="realTimeUpdates">
<property name="toolTip">
@ -479,116 +564,6 @@ automatically every 300ms, which will help for fast tuning.</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_2">
<attribute name="title">
<string>Limits</string>
</attribute>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Angle limits</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QFrame" name="frame">
<property name="toolTip">
<string>In this area, you can setup the limits for roll, pitch and yaw in attitude mode, i.e. what max attitude the airframe will reach if the sticks are pushed to the max.</string>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>RollMax</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QSpinBox" name="rollMax">
<property name="maximum">
<number>180</number>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>PitchMax</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QSpinBox" name="pitchMax">
<property name="maximum">
<number>180</number>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>YawMax</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QSpinBox" name="yawMax">
<property name="maximum">
<number>180</number>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
@ -602,19 +577,6 @@ automatically every 300ms, which will help for fast tuning.</string>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="resetStabilizationToDefaults">
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Not implemented yet.</string>
</property>
<property name="text">
<string>Reset to defaults</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="getStabilizationCurrent">
<property name="text">