2012-07-17 01:24:22 +02:00
|
|
|
/**
|
|
|
|
******************************************************************************
|
|
|
|
*
|
|
|
|
* @file multipage.cpp
|
|
|
|
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012.
|
|
|
|
* @addtogroup
|
|
|
|
* @{
|
|
|
|
* @addtogroup MultiPage
|
|
|
|
* @{
|
|
|
|
* @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 "multipage.h"
|
|
|
|
#include "setupwizard.h"
|
|
|
|
|
|
|
|
MultiPage::MultiPage(SetupWizard *wizard, QWidget *parent) :
|
2014-09-02 11:03:52 +02:00
|
|
|
SelectionPage(wizard, QString(":/configgadget/images/multirotor-shapes.svg"), parent)
|
2014-09-02 16:46:40 +02:00
|
|
|
{}
|
2012-07-17 01:24:22 +02:00
|
|
|
|
|
|
|
MultiPage::~MultiPage()
|
2014-09-02 16:46:40 +02:00
|
|
|
{}
|
2012-07-17 01:24:22 +02:00
|
|
|
|
2014-09-05 17:31:41 +02:00
|
|
|
void MultiPage::initializePage(VehicleConfigurationSource *settings)
|
|
|
|
{
|
|
|
|
Q_UNUSED(settings);
|
|
|
|
}
|
|
|
|
|
2014-09-02 11:03:52 +02:00
|
|
|
bool MultiPage::validatePage(SelectionItem *selectedItem)
|
2012-08-15 01:04:54 +02:00
|
|
|
{
|
2014-09-02 11:03:52 +02:00
|
|
|
getWizard()->setVehicleSubType((SetupWizard::VEHICLE_SUB_TYPE)selectedItem->id());
|
2012-08-27 07:19:46 +02:00
|
|
|
return true;
|
2012-08-15 01:04:54 +02:00
|
|
|
}
|
|
|
|
|
2014-09-02 11:03:52 +02:00
|
|
|
void MultiPage::setupSelection(Selection *selection)
|
2012-10-10 00:36:29 +02:00
|
|
|
{
|
2014-09-02 11:03:52 +02:00
|
|
|
selection->setTitle(tr("OpenPilot Multirotor Configuration"));
|
|
|
|
selection->setText(tr("This part of the wizard will set up the OpenPilot controller for use with a flying platform utilizing multiple rotors. "
|
2014-09-02 16:46:40 +02:00
|
|
|
"The wizard supports the most common types of multirotors. Other variants of multirotors can be configured by using custom "
|
|
|
|
"configuration options in the Configuration plugin in the GCS.\n\n"
|
|
|
|
"Please select the type of multirotor you want to create a configuration for below:"));
|
2014-09-02 14:01:02 +02:00
|
|
|
|
2014-09-02 11:03:52 +02:00
|
|
|
selection->addItem(tr("Tricopter"),
|
|
|
|
tr("The Tricopter uses three motors and one servo. The servo is used to give yaw authority to the rear motor. "
|
2014-09-02 16:46:40 +02:00
|
|
|
"The front motors are rotating in opposite directions. The Tricopter is known for its sweeping yaw movement and "
|
|
|
|
"it is very well suited for FPV since the front rotors are spread wide apart."),
|
2014-09-02 11:03:52 +02:00
|
|
|
"tri",
|
|
|
|
SetupWizard::MULTI_ROTOR_TRI_Y);
|
|
|
|
|
|
|
|
selection->addItem(tr("Quadcopter X"),
|
|
|
|
tr("The X Quadcopter uses four motors and is the most common multi rotor configuration. Two of the motors rotate clockwise "
|
2014-09-02 16:46:40 +02:00
|
|
|
"and two counter clockwise. The motors positioned diagonal to each other rotate in the same direction. "
|
|
|
|
"This setup is perfect for sport flying and is also commonly used for FPV platforms."),
|
2014-09-02 11:03:52 +02:00
|
|
|
"quad-x",
|
|
|
|
SetupWizard::MULTI_ROTOR_QUAD_X);
|
|
|
|
|
|
|
|
selection->addItem(tr("Quadcopter +"),
|
2014-09-02 16:46:40 +02:00
|
|
|
tr("The Plus(+) Quadcopter uses four motors and is similar to the X Quadcopter but the forward direction is offset by 45 degrees. "
|
|
|
|
"The motors front and rear rotate in clockwise and the motors right and left rotate counter-clockwise. "
|
|
|
|
"This setup was one of the first to be used and is still used for sport flying. This configuration is not that well suited "
|
|
|
|
"for FPV since the fore rotor tend to be in the way of the camera."),
|
|
|
|
"quad-plus",
|
|
|
|
SetupWizard::MULTI_ROTOR_QUAD_PLUS);
|
2014-09-02 11:03:52 +02:00
|
|
|
|
2014-09-16 18:55:43 +02:00
|
|
|
selection->addItem(tr("Quadcopter H"),
|
|
|
|
tr("Quadcopter H, Blackout miniH"),
|
|
|
|
"quad-h",
|
2014-09-16 19:27:18 +02:00
|
|
|
SetupWizard::MULTI_ROTOR_QUAD_H);
|
2014-09-16 18:55:43 +02:00
|
|
|
|
2014-09-02 11:03:52 +02:00
|
|
|
selection->addItem(tr("Hexacopter"),
|
|
|
|
tr("A multirotor with six motors, one motor in front."),
|
|
|
|
"quad-hexa",
|
|
|
|
SetupWizard::MULTI_ROTOR_HEXA);
|
|
|
|
|
|
|
|
selection->addItem(tr("Hexacopter X"),
|
|
|
|
tr("A multirotor with six motors, two motors in front."),
|
|
|
|
"quad-hexa-X",
|
|
|
|
SetupWizard::MULTI_ROTOR_HEXA_X);
|
|
|
|
|
|
|
|
selection->addItem(tr("Hexacopter H"),
|
|
|
|
tr("A multirotor with six motors in two rows."),
|
|
|
|
"quad-hexa-H",
|
|
|
|
SetupWizard::MULTI_ROTOR_HEXA_H);
|
|
|
|
|
|
|
|
selection->addItem(tr("Hexacopter Coax (Y6)"),
|
|
|
|
tr("A multirotor with six motors mounted in a coaxial fashion."),
|
|
|
|
"hexa-coax",
|
|
|
|
SetupWizard::MULTI_ROTOR_HEXA_COAX_Y);
|
2012-07-17 01:24:22 +02:00
|
|
|
}
|