1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-10 20:52:11 +01:00

70 lines
3.1 KiB
C++
Raw Normal View History

2014-08-25 06:31:52 +10:00
/**
******************************************************************************
*
* @file fixedwingpage.cpp
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012.
* @addtogroup
* @{
* @addtogroup FixedWingPage
* @{
* @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 "airspeedpage.h"
#include "setupwizard.h"
AirSpeedPage::AirSpeedPage(SetupWizard *wizard, QWidget *parent) :
2014-09-03 02:19:15 +10:00
SelectionPage(wizard, QString(":/setupwizard/resources/fixedwing-shapes-wizard-no-numbers.svg"), parent)
{}
2014-08-25 06:31:52 +10:00
AirSpeedPage::~AirSpeedPage()
2014-09-03 02:19:15 +10:00
{}
2014-08-25 06:31:52 +10:00
2014-09-03 02:19:15 +10:00
bool AirSpeedPage::validatePage(SelectionItem *seletedItem)
2014-08-25 06:31:52 +10:00
{
2014-09-03 02:19:15 +10:00
getWizard()->setAirspeedType((SetupWizard::AIRSPEED_TYPE)seletedItem->id());
2014-08-25 06:31:52 +10:00
return true;
}
2014-09-03 02:19:15 +10:00
void AirSpeedPage::setupSelection(Selection *selection)
2014-08-25 06:31:52 +10:00
{
2014-09-03 02:19:15 +10:00
selection->setTitle(tr("OpenPilot Airspeed Sensor Selection"));
selection->setText(tr("This part of the wizard will help you select and configure "
"flying aircraft utilizing servos. The wizard supports the most common types of fixed-wing "
"aircraft, other variants of fixed-wing aircraft can be configured by using custom "
"configuration options in the Configuration plugin in the GCS.\n\n"
"Please select the type of fixed-wing you want to create a configuration for below:"));
selection->addItem(tr("Estimated"),
tr("This setup expects a traditional airframe using two independent aileron servos "
"on their own channel (not connected by Y adapter) plus an elevator and a rudder."),
"aileron",
SetupWizard::ESTIMATE);
selection->addItem(tr("EagleTree"),
tr("This setup expects a traditional airframe using a single alieron servo or two servos "
"connected by a Y adapter plus an elevator and a rudder."),
"aileron-single",
SetupWizard::EAGLETREE);
selection->addItem(tr("MS4525 Based"),
tr("This setup currently expects a flying-wing setup, an elevon plus rudder setup is not yet "
"supported. Setup should include only two elevons, and should explicitly not include a rudder."),
"elevon",
SetupWizard::MS4525);
2014-08-25 06:31:52 +10:00
}