diff --git a/ground/openpilotgcs/src/plugins/setupwizard/pages/airframestabfixedwing.cpp b/ground/openpilotgcs/src/plugins/setupwizard/pages/airframestabfixedwing.cpp new file mode 100644 index 000000000..ae78d9254 --- /dev/null +++ b/ground/openpilotgcs/src/plugins/setupwizard/pages/airframestabfixedwing.cpp @@ -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; +} diff --git a/ground/openpilotgcs/src/plugins/setupwizard/pages/airframestabfixedwing.h b/ground/openpilotgcs/src/plugins/setupwizard/pages/airframestabfixedwing.h new file mode 100644 index 000000000..641927b7d --- /dev/null +++ b/ground/openpilotgcs/src/plugins/setupwizard/pages/airframestabfixedwing.h @@ -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 diff --git a/ground/openpilotgcs/src/plugins/setupwizard/pages/airframestabfixedwing.ui b/ground/openpilotgcs/src/plugins/setupwizard/pages/airframestabfixedwing.ui new file mode 100644 index 000000000..582c76ef4 --- /dev/null +++ b/ground/openpilotgcs/src/plugins/setupwizard/pages/airframestabfixedwing.ui @@ -0,0 +1,45 @@ + + + AirframeStabFixedwing + + + + 0 + 0 + 600 + 400 + + + + WizardPage + + + + + 20 + 170 + 551 + 51 + + + + <!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> + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + true + + + + + + diff --git a/ground/openpilotgcs/src/plugins/setupwizard/setupwizard.cpp b/ground/openpilotgcs/src/plugins/setupwizard/setupwizard.cpp index dd82b7cf5..df335777a 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/setupwizard.cpp +++ b/ground/openpilotgcs/src/plugins/setupwizard/setupwizard.cpp @@ -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); diff --git a/ground/openpilotgcs/src/plugins/setupwizard/setupwizard.h b/ground/openpilotgcs/src/plugins/setupwizard/setupwizard.h index c941561af..d914b994c 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/setupwizard.h +++ b/ground/openpilotgcs/src/plugins/setupwizard/setupwizard.h @@ -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; diff --git a/ground/openpilotgcs/src/plugins/setupwizard/setupwizard.pro b/ground/openpilotgcs/src/plugins/setupwizard/setupwizard.pro index 51a98c880..9296cd5a7 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/setupwizard.pro +++ b/ground/openpilotgcs/src/plugins/setupwizard/setupwizard.pro @@ -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