1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-17 02:52:12 +01:00

More work on autotune from GCS

This commit is contained in:
James Cotton 2012-07-31 18:04:42 -05:00
parent c365a9c7ff
commit dfd1aceb06
3 changed files with 87 additions and 26 deletions

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>443</width>
<height>505</height>
<height>560</height>
</rect>
</property>
<property name="windowTitle">
@ -19,39 +19,77 @@
<x>20</x>
<y>10</y>
<width>401</width>
<height>121</height>
<height>131</height>
</rect>
</property>
<property name="title">
<string>Tuning Aggressiveness</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<item row="1" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Rate Tuning:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<item row="1" column="1">
<widget class="QSlider" name="rateTuning">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="objrelation" stdset="0">
<stringlist>
<string>obj1name:RelayTuningSettings</string>
<string>fieldname:RateGain</string>
<string>scale:0.01</string>
<string>haslimits:yes</string>
</stringlist>
</property>
</widget>
</item>
<item row="1" column="0">
<item row="2" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Attitude Tuning:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<item row="2" column="1">
<widget class="QSlider" name="attitudeTuning">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="objrelation" stdset="0">
<stringlist>
<string>obj1name:RelayTuningSettings</string>
<string>fieldname:AttitudeGain</string>
<string>elemescale:0.01</string>
<string>haslimits:yes</string>
</stringlist>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_21">
<property name="text">
<string>StepSize</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QSlider" name="stepSizeSlider">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="objrelation" stdset="0">
<stringlist>
<string>obj1name:RelatyTuningSettings</string>
<string>fieldname:Amplitude</string>
<string>scale:0.01</string>
<string>haslimits:yes</string>
</stringlist>
</property>
</widget>
</item>
</layout>
@ -62,7 +100,7 @@
<x>20</x>
<y>250</y>
<width>401</width>
<height>131</height>
<height>121</height>
</rect>
</property>
<property name="title">
@ -112,56 +150,56 @@
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_13">
<widget class="QLabel" name="rollRateKp">
<property name="text">
<string>0</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="label_14">
<widget class="QLabel" name="pitchRateKp">
<property name="text">
<string>0</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="label_15">
<widget class="QLabel" name="rollRateKi">
<property name="text">
<string>0</string>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QLabel" name="label_16">
<widget class="QLabel" name="pitchRateKi">
<property name="text">
<string>0</string>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QLabel" name="label_17">
<widget class="QLabel" name="rollAttitudeKp">
<property name="text">
<string>0</string>
</property>
</widget>
</item>
<item row="2" column="3">
<widget class="QLabel" name="label_18">
<widget class="QLabel" name="pitchAttitudeKp">
<property name="text">
<string>0</string>
</property>
</widget>
</item>
<item row="1" column="4">
<widget class="QLabel" name="label_19">
<widget class="QLabel" name="rollAttitudeKi">
<property name="text">
<string>0</string>
</property>
</widget>
</item>
<item row="2" column="4">
<widget class="QLabel" name="label_20">
<widget class="QLabel" name="pitchAttitudeKi">
<property name="text">
<string>0</string>
</property>
@ -175,11 +213,11 @@
<x>20</x>
<y>140</y>
<width>401</width>
<height>101</height>
<height>111</height>
</rect>
</property>
<property name="title">
<string>Measured Values</string>
<string>Measured Properties</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="0">
@ -206,14 +244,14 @@
<item row="0" column="1">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Period</string>
<string>Period (ms)</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Amplitude</string>
<string>Amplitude (deg/s)</string>
</property>
</widget>
</item>
@ -244,7 +282,7 @@
<property name="geometry">
<rect>
<x>20</x>
<y>400</y>
<y>480</y>
<width>401</width>
<height>79</height>
</rect>
@ -934,6 +972,33 @@ border-radius: 4;
</item>
</layout>
</widget>
<widget class="QLabel" name="label_22">
<property name="geometry">
<rect>
<x>30</x>
<y>440</y>
<width>371</width>
<height>31</height>
</rect>
</property>
<property name="text">
<string>The buttons below change the autotuning settings which
will alter thingsfor the next autotuning flight</string>
</property>
</widget>
<widget class="QPushButton" name="useComputedValues">
<property name="geometry">
<rect>
<x>270</x>
<y>380</y>
<width>161</width>
<height>24</height>
</rect>
</property>
<property name="text">
<string>Use Computed Values</string>
</property>
</widget>
</widget>
<resources/>
<connections/>

View File

@ -22,10 +22,4 @@ ConfigAutotuneWidget::ConfigAutotuneWidget(QWidget *parent) :
disableMouseWheelEvents();
}
ConfigAutotuneWidget::~ConfigAutotuneWidget()
{
// Do nothing
}

View File

@ -1,6 +1,8 @@
<xml>
<object name="RelayTuningSettings" singleinstance="true" settings="true">
<description>Setting to run a relay tuning algorithm</description>
<field name="RateGain" units="" type="float" elements="1" defaultvalue="0.5"/>
<field name="AttitudeGain" units="" type="float" elements="1" defaultvalue="0.5"/>
<field name="Amplitude" units="" type="float" elements="1" defaultvalue="0.05"/>
<access gcs="readwrite" flight="readwrite"/>
<telemetrygcs acked="true" updatemode="onchange" period="0"/>