mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-03-15 07:29:15 +01:00
Initial tuning page
This commit is contained in:
parent
135853d5a1
commit
b1a7f959b5
@ -25,17 +25,17 @@
|
|||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "airframestabfixedwingpage.h"
|
#include "airframeinitialtuningpage.h"
|
||||||
#include "ui_airframestabfixedwingpage.h"
|
#include "ui_airframeinitialtuningpage.h"
|
||||||
|
|
||||||
AirframeStabFixedwingPage::AirframeStabFixedwingPage(SetupWizard *wizard, QWidget *parent) :
|
AirframeInitialTuningPage::AirframeInitialTuningPage(SetupWizard *wizard, QWidget *parent) :
|
||||||
AbstractWizardPage(wizard, parent),
|
AbstractWizardPage(wizard, parent),
|
||||||
ui(new Ui::AirframeStabFixedwingPage)
|
ui(new Ui::AirframeInitialTuningPage)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
AirframeStabFixedwingPage::~AirframeStabFixedwingPage()
|
AirframeInitialTuningPage::~AirframeInitialTuningPage()
|
||||||
{
|
{
|
||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
@ -25,24 +25,24 @@
|
|||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef AIRFRAMESTABFIXEDWINGPAGE_H
|
#ifndef AIRFRAMEINITIALTUNINGPAGE_H
|
||||||
#define AIRFRAMESTABFIXEDWINGPAGE_H
|
#define AIRFRAMEINITIALTUNINGPAGE_H
|
||||||
|
|
||||||
#include "abstractwizardpage.h"
|
#include "abstractwizardpage.h"
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class AirframeStabFixedwingPage;
|
class AirframeInitialTuningPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
class AirframeStabFixedwingPage : public AbstractWizardPage {
|
class AirframeInitialTuningPage : public AbstractWizardPage {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit AirframeStabFixedwingPage(SetupWizard *wizard, QWidget *parent = 0);
|
explicit AirframeInitialTuningPage(SetupWizard *wizard, QWidget *parent = 0);
|
||||||
~AirframeStabFixedwingPage();
|
~AirframeInitialTuningPage();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::AirframeStabFixedwingPage *ui;
|
Ui::AirframeInitialTuningPage *ui;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // AIRFRAMESTABFIXEDWINGPAGE_H
|
#endif // AIRFRAMEINITIALTUNINGPAGE_H
|
@ -0,0 +1,87 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>AirframeInitialTuningPage</class>
|
||||||
|
<widget class="QWizardPage" name="AirframeInitialTuningPage">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>600</width>
|
||||||
|
<height>400</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>WizardPage</string>
|
||||||
|
</property>
|
||||||
|
<widget class="QLabel" name="label_main">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>9</x>
|
||||||
|
<y>9</y>
|
||||||
|
<width>582</width>
|
||||||
|
<height>81</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||||
|
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||||
|
p, li { white-space: pre-wrap; }
|
||||||
|
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:400; font-style:normal;">
|
||||||
|
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">Initial Tuning</span></p>
|
||||||
|
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt; font-weight:600;"><br /></p>
|
||||||
|
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2,sans-serif';">This section of the OpenPilot Wizard allows you to select a set of initial tunning parameters for your airframe. Presented below is a list of common airframe types, select the one that matches your airframe the closest, if unsure select the generic variant.</span> </p></body></html></string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="horizontalLayoutWidget">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>10</x>
|
||||||
|
<y>100</y>
|
||||||
|
<width>581</width>
|
||||||
|
<height>291</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="2,3">
|
||||||
|
<item>
|
||||||
|
<widget class="QListWidget" name="listWidget">
|
||||||
|
<property name="verticalScrollBarPolicy">
|
||||||
|
<enum>Qt::ScrollBarAlwaysOn</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout" stretch="10,4">
|
||||||
|
<item>
|
||||||
|
<widget class="QGraphicsView" name="graphicsView"/>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Description</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<zorder>label_main</zorder>
|
||||||
|
<zorder>label_main</zorder>
|
||||||
|
<zorder>horizontalLayoutWidget</zorder>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
@ -1,45 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>AirframeStabFixedwingPage</class>
|
|
||||||
<widget class="QWizardPage" name="AirframeStabFixedwingPage">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>600</width>
|
|
||||||
<height>400</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>WizardPage</string>
|
|
||||||
</property>
|
|
||||||
<widget class="QLabel" name="label_2">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>20</x>
|
|
||||||
<y>130</y>
|
|
||||||
<width>551</width>
|
|
||||||
<height>191</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
|
||||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
|
||||||
p, li { white-space: pre-wrap; }
|
|
||||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:400; font-style:normal;">
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">TODO: This page handles PIDs, we get a choice of airframes, some generics as well as specifics like FPV Raptor and Funjet etc</span></p>
|
|
||||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt; font-weight:600;"><br /></p>
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">Explain these are a starting point and likely will need further tuning as no two airframes are completely identical </span></p>
|
|
||||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html></string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
<resources/>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
|
@ -46,7 +46,7 @@
|
|||||||
#include "pages/rebootpage.h"
|
#include "pages/rebootpage.h"
|
||||||
#include "pages/outputcalibrationpage.h"
|
#include "pages/outputcalibrationpage.h"
|
||||||
#include "pages/revocalibrationpage.h"
|
#include "pages/revocalibrationpage.h"
|
||||||
#include "pages/airframestabfixedwingpage.h"
|
#include "pages/airframeinitialtuningpage.h"
|
||||||
#include "extensionsystem/pluginmanager.h"
|
#include "extensionsystem/pluginmanager.h"
|
||||||
#include "vehicleconfigurationhelper.h"
|
#include "vehicleconfigurationhelper.h"
|
||||||
#include "actuatorsettings.h"
|
#include "actuatorsettings.h"
|
||||||
@ -163,7 +163,7 @@ int SetupWizard::nextId() const
|
|||||||
{
|
{
|
||||||
switch (getVehicleType()) {
|
switch (getVehicleType()) {
|
||||||
case VEHICLE_FIXEDWING:
|
case VEHICLE_FIXEDWING:
|
||||||
return PAGE_AIRFRAMESTAB_FIXEDWING;
|
return PAGE_AIRFRAME_INITIAL_TUNING;
|
||||||
|
|
||||||
// TODO: PID selection pages for multi and heli
|
// TODO: PID selection pages for multi and heli
|
||||||
case VEHICLE_MULTI:
|
case VEHICLE_MULTI:
|
||||||
@ -186,7 +186,7 @@ int SetupWizard::nextId() const
|
|||||||
case PAGE_AIRSPEED:
|
case PAGE_AIRSPEED:
|
||||||
return PAGE_SUMMARY;
|
return PAGE_SUMMARY;
|
||||||
|
|
||||||
case PAGE_AIRFRAMESTAB_FIXEDWING:
|
case PAGE_AIRFRAME_INITIAL_TUNING:
|
||||||
return PAGE_SAVE;
|
return PAGE_SAVE;
|
||||||
|
|
||||||
case PAGE_SUMMARY:
|
case PAGE_SUMMARY:
|
||||||
@ -440,7 +440,7 @@ void SetupWizard::createPages()
|
|||||||
setPage(PAGE_SAVE, new SavePage(this));
|
setPage(PAGE_SAVE, new SavePage(this));
|
||||||
setPage(PAGE_REBOOT, new RebootPage(this));
|
setPage(PAGE_REBOOT, new RebootPage(this));
|
||||||
setPage(PAGE_NOTYETIMPLEMENTED, new NotYetImplementedPage(this));
|
setPage(PAGE_NOTYETIMPLEMENTED, new NotYetImplementedPage(this));
|
||||||
setPage(PAGE_AIRFRAMESTAB_FIXEDWING, new AirframeStabFixedwingPage(this));
|
setPage(PAGE_AIRFRAME_INITIAL_TUNING, new AirframeInitialTuningPage(this));
|
||||||
setPage(PAGE_END, new OPEndPage(this));
|
setPage(PAGE_END, new OPEndPage(this));
|
||||||
|
|
||||||
setStartId(PAGE_START);
|
setStartId(PAGE_START);
|
||||||
|
@ -177,7 +177,7 @@ private:
|
|||||||
enum { PAGE_START, PAGE_CONTROLLER, PAGE_VEHICLES, PAGE_MULTI, PAGE_FIXEDWING,
|
enum { PAGE_START, PAGE_CONTROLLER, PAGE_VEHICLES, PAGE_MULTI, PAGE_FIXEDWING,
|
||||||
PAGE_AIRSPEED, PAGE_GPS, PAGE_HELI, PAGE_SURFACE, PAGE_INPUT, PAGE_ESC, PAGE_SERVO,
|
PAGE_AIRSPEED, PAGE_GPS, PAGE_HELI, PAGE_SURFACE, PAGE_INPUT, PAGE_ESC, PAGE_SERVO,
|
||||||
PAGE_BIAS_CALIBRATION, PAGE_REVO_CALIBRATION, PAGE_OUTPUT_CALIBRATION,
|
PAGE_BIAS_CALIBRATION, PAGE_REVO_CALIBRATION, PAGE_OUTPUT_CALIBRATION,
|
||||||
PAGE_SAVE, PAGE_SUMMARY, PAGE_NOTYETIMPLEMENTED, PAGE_AIRFRAMESTAB_FIXEDWING,
|
PAGE_SAVE, PAGE_SUMMARY, PAGE_NOTYETIMPLEMENTED, PAGE_AIRFRAME_INITIAL_TUNING,
|
||||||
PAGE_REBOOT, PAGE_END, PAGE_UPDATE };
|
PAGE_REBOOT, PAGE_END, PAGE_UPDATE };
|
||||||
void createPages();
|
void createPages();
|
||||||
bool saveHardwareSettings() const;
|
bool saveHardwareSettings() const;
|
||||||
|
@ -37,10 +37,10 @@ HEADERS += setupwizardplugin.h \
|
|||||||
pages/revocalibrationpage.h \
|
pages/revocalibrationpage.h \
|
||||||
biascalibrationutil.h \
|
biascalibrationutil.h \
|
||||||
pages/biascalibrationpage.h \
|
pages/biascalibrationpage.h \
|
||||||
pages/airframestabfixedwingpage.h \
|
|
||||||
pages/escpage.h \
|
pages/escpage.h \
|
||||||
pages/servopage.h \
|
pages/servopage.h \
|
||||||
pages/selectionpage.h
|
pages/selectionpage.h \
|
||||||
|
pages/airframeinitialtuningpage.h
|
||||||
|
|
||||||
SOURCES += setupwizardplugin.cpp \
|
SOURCES += setupwizardplugin.cpp \
|
||||||
setupwizard.cpp \
|
setupwizard.cpp \
|
||||||
@ -69,10 +69,10 @@ SOURCES += setupwizardplugin.cpp \
|
|||||||
pages/revocalibrationpage.cpp \
|
pages/revocalibrationpage.cpp \
|
||||||
biascalibrationutil.cpp \
|
biascalibrationutil.cpp \
|
||||||
pages/biascalibrationpage.cpp \
|
pages/biascalibrationpage.cpp \
|
||||||
pages/airframestabfixedwingpage.cpp \
|
|
||||||
pages/escpage.cpp \
|
pages/escpage.cpp \
|
||||||
pages/servopage.cpp \
|
pages/servopage.cpp \
|
||||||
pages/selectionpage.cpp
|
pages/selectionpage.cpp \
|
||||||
|
pages/airframeinitialtuningpage.cpp
|
||||||
|
|
||||||
OTHER_FILES += SetupWizard.pluginspec
|
OTHER_FILES += SetupWizard.pluginspec
|
||||||
|
|
||||||
@ -93,10 +93,10 @@ FORMS += \
|
|||||||
pages/autoupdatepage.ui \
|
pages/autoupdatepage.ui \
|
||||||
pages/revocalibrationpage.ui \
|
pages/revocalibrationpage.ui \
|
||||||
pages/biascalibrationpage.ui \
|
pages/biascalibrationpage.ui \
|
||||||
pages/airframestabfixedwingpage.ui \
|
|
||||||
pages/escpage.ui \
|
pages/escpage.ui \
|
||||||
pages/servopage.ui \
|
pages/servopage.ui \
|
||||||
pages/selectionpage.ui
|
pages/selectionpage.ui \
|
||||||
|
pages/airframeinitialtuningpage.ui
|
||||||
|
|
||||||
RESOURCES += \
|
RESOURCES += \
|
||||||
wizardResources.qrc
|
wizardResources.qrc
|
||||||
|
Loading…
x
Reference in New Issue
Block a user