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

74 lines
3.4 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 04:31:39 +10:00
SelectionPage(wizard, QString(":/setupwizard/resources/airspeed-shapes.svg"), parent)
2014-09-03 02:19:15 +10:00
{}
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"));
2014-09-03 04:31:39 +10:00
selection->setText(tr("This part of the wizard will help you select and configure an airspeed sensor which "
"are also commonly called Pitot tubes. OpenPilot support three methods to obtain "
"airspeed data, one is a software estimation technique and the other two "
"utilize hardware sensors.\n\n"
"Please select how you wish to obtain airspeed data below:"));
2014-09-03 02:19:15 +10:00
selection->addItem(tr("Estimated"),
2014-09-03 04:31:39 +10:00
tr("This option uses an intelligent estimation algorithm which utilizes the OpenPilot INS/GPS "
2014-09-03 04:41:49 +10:00
"to estimate wind speed and subtract it from ground speed obtained from the GPS.\n\n"
2014-09-03 04:31:39 +10:00
"This solution is highly accurate in normal level flight with the drawback of being less "
"accurate in rapid altitude changes. "),
"estimated",
2014-09-03 02:19:15 +10:00
SetupWizard::ESTIMATE);
selection->addItem(tr("EagleTree"),
2014-09-03 04:31:39 +10:00
tr("Select this option to use the Airspeed MicroSensor V3 from EagleTree, this is an accurate "
2014-09-03 04:41:49 +10:00
"airspeed sensor that includes on-board Temperature Compensation.\n\n"
2014-09-03 07:16:36 +10:00
"Selecting this option will set your board's Flexi-Port in to I2C mode."),
2014-09-03 04:31:39 +10:00
"eagletree",
2014-09-03 02:19:15 +10:00
SetupWizard::EAGLETREE);
selection->addItem(tr("MS4525 Based"),
2014-09-03 04:31:39 +10:00
tr("Select this option to use an airspeed sensor based on the MS4525DO pressure transducer "
2014-09-03 04:41:49 +10:00
"from Measurement Specialties. This includes the PixHawk sensor and their clones.\n\n"
2014-09-03 07:16:36 +10:00
"Selecting this option will set your board's Flexi-Port in to I2C mode."),
2014-09-03 04:31:39 +10:00
"ms4525",
2014-09-03 02:19:15 +10:00
SetupWizard::MS4525);
2014-08-25 06:31:52 +10:00
}