mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-29 14:52:12 +01:00
Start adding PID page
This commit is contained in:
parent
a46d5316ec
commit
00ed28c983
@ -0,0 +1,42 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
*
|
||||
* @file notyetimplementedpage.cpp
|
||||
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012.
|
||||
* @addtogroup
|
||||
* @{
|
||||
* @addtogroup NotYetImplementedPage
|
||||
* @{
|
||||
* @brief
|
||||
*****************************************************************************/
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "airframestabfixedwing.h"
|
||||
#include "ui_airframestabfixedwing.h"
|
||||
|
||||
AirframeStabFixedwing::AirframeStabFixedwing(SetupWizard *wizard, QWidget *parent) :
|
||||
AbstractWizardPage(wizard, parent),
|
||||
ui(new Ui::AirframeStabFixedwing)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setFinalPage(true);
|
||||
}
|
||||
|
||||
AirframeStabFixedwing::~AirframeStabFixedwing()
|
||||
{
|
||||
delete ui;
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
*
|
||||
* @file notyetimplementedpage.h
|
||||
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012.
|
||||
* @addtogroup
|
||||
* @{
|
||||
* @addtogroup NotYetImplementedPage
|
||||
* @{
|
||||
* @brief
|
||||
*****************************************************************************/
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef AIRFRAMESTABFIXEDWING_H
|
||||
#define AIRFRAMESTABFIXEDWING_H
|
||||
|
||||
#include "abstractwizardpage.h"
|
||||
|
||||
namespace Ui {
|
||||
class AirframeStabFixedwing;
|
||||
}
|
||||
|
||||
class AirframeStabFixedwing : public AbstractWizardPage {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit AirframeStabFixedwing(SetupWizard *wizard, QWidget *parent = 0);
|
||||
~AirframeStabFixedwing();
|
||||
|
||||
private:
|
||||
Ui::AirframeStabFixedwing *ui;
|
||||
};
|
||||
|
||||
#endif // AIRFRAMESTABFIXEDWING_H
|
@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>AirframeStabFixedwing</class>
|
||||
<widget class="QWizardPage" name="AirframeStabFixedwing">
|
||||
<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>170</y>
|
||||
<width>551</width>
|
||||
<height>51</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>
|
@ -44,6 +44,7 @@
|
||||
#include "pages/rebootpage.h"
|
||||
#include "pages/outputcalibrationpage.h"
|
||||
#include "pages/revocalibrationpage.h"
|
||||
#include "pages/airframestabfixedwing.h"
|
||||
#include "extensionsystem/pluginmanager.h"
|
||||
#include "vehicleconfigurationhelper.h"
|
||||
#include "actuatorsettings.h"
|
||||
@ -138,6 +139,20 @@ int SetupWizard::nextId() const
|
||||
// case PAGE_REVO_CALIBRATION:
|
||||
// return PAGE_OUTPUT_CALIBRATION;
|
||||
case PAGE_OUTPUT_CALIBRATION:
|
||||
{
|
||||
switch (getVehicleType()) {
|
||||
case VEHICLE_FIXEDWING:
|
||||
return PAGE_AIRFRAMESTAB_FIXEDWING;
|
||||
//TODO: Pages for Multi and heli
|
||||
case VEHICLE_MULTI:
|
||||
case VEHICLE_HELI:
|
||||
case VEHICLE_SURFACE:
|
||||
case VEHICLE_UNKNOWN:
|
||||
return PAGE_SAVE;
|
||||
}
|
||||
}
|
||||
|
||||
case PAGE_AIRFRAMESTAB_FIXEDWING:
|
||||
return PAGE_SAVE;
|
||||
|
||||
case PAGE_SUMMARY:
|
||||
@ -338,6 +353,7 @@ void SetupWizard::createPages()
|
||||
setPage(PAGE_SAVE, new SavePage(this));
|
||||
setPage(PAGE_REBOOT, new RebootPage(this));
|
||||
setPage(PAGE_NOTYETIMPLEMENTED, new NotYetImplementedPage(this));
|
||||
setPage(PAGE_AIRFRAMESTAB_FIXEDWING, new AirframeStabFixedwing(this));
|
||||
setPage(PAGE_END, new OPEndPage(this));
|
||||
|
||||
setStartId(PAGE_START);
|
||||
|
@ -158,8 +158,8 @@ private:
|
||||
enum { PAGE_START, PAGE_CONTROLLER, PAGE_VEHICLES, PAGE_MULTI, PAGE_FIXEDWING,
|
||||
PAGE_HELI, PAGE_SURFACE, PAGE_INPUT, PAGE_OUTPUT, PAGE_OUTPUT_FIXEDWING,
|
||||
PAGE_BIAS_CALIBRATION,PAGE_REVO_CALIBRATION, PAGE_OUTPUT_CALIBRATION,
|
||||
PAGE_SAVE, PAGE_SUMMARY,PAGE_NOTYETIMPLEMENTED, PAGE_REBOOT, PAGE_END,
|
||||
PAGE_UPDATE };
|
||||
PAGE_SAVE, PAGE_SUMMARY, PAGE_NOTYETIMPLEMENTED, PAGE_AIRFRAMESTAB_FIXEDWING,
|
||||
PAGE_REBOOT, PAGE_END, PAGE_UPDATE };
|
||||
void createPages();
|
||||
bool saveHardwareSettings() const;
|
||||
bool canAutoUpdate() const;
|
||||
|
@ -36,7 +36,8 @@ HEADERS += setupwizardplugin.h \
|
||||
pages/autoupdatepage.h \
|
||||
pages/revocalibrationpage.h \
|
||||
biascalibrationutil.h \
|
||||
pages/biascalibrationpage.h
|
||||
pages/biascalibrationpage.h \
|
||||
pages/airframestabfixedwing.h
|
||||
|
||||
SOURCES += setupwizardplugin.cpp \
|
||||
setupwizard.cpp \
|
||||
@ -64,7 +65,8 @@ SOURCES += setupwizardplugin.cpp \
|
||||
pages/autoupdatepage.cpp \
|
||||
pages/revocalibrationpage.cpp \
|
||||
biascalibrationutil.cpp \
|
||||
pages/biascalibrationpage.cpp
|
||||
pages/biascalibrationpage.cpp \
|
||||
pages/airframestabfixedwing.cpp
|
||||
|
||||
OTHER_FILES += SetupWizard.pluginspec
|
||||
|
||||
@ -88,7 +90,8 @@ FORMS += \
|
||||
pages/savepage.ui \
|
||||
pages/autoupdatepage.ui \
|
||||
pages/revocalibrationpage.ui \
|
||||
pages/biascalibrationpage.ui
|
||||
pages/biascalibrationpage.ui \
|
||||
pages/airframestabfixedwing.ui
|
||||
|
||||
RESOURCES += \
|
||||
wizardResources.qrc
|
||||
|
Loading…
x
Reference in New Issue
Block a user