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-04 09:50:15 +10:00
|
|
|
SelectionPage(wizard, QString(":/setupwizard/resources/sensor-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 00:05:47 +02:00
|
|
|
bool AirSpeedPage::validatePage(SelectionItem *selectedItem)
|
2014-08-25 06:31:52 +10:00
|
|
|
{
|
2014-09-03 00:05:47 +02:00
|
|
|
getWizard()->setAirspeedType((SetupWizard::AIRSPEED_TYPE)selectedItem->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 07:42:15 +10:00
|
|
|
selection->setText(tr("This part of the wizard will help you select and configure a way to obtain "
|
|
|
|
"airspeed data. OpenPilot support three methods to achieve this, one is a "
|
|
|
|
"software estimation technique and the other two utilize hardware sensors.\n\n"
|
2014-09-03 04:31:39 +10:00
|
|
|
"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 "
|
2014-09-03 07:42:15 +10:00
|
|
|
"accurate in rapid altitude changes.\n\n"),
|
2014-09-04 10:01:54 +10:00
|
|
|
"estimated-airspeed-sensor",
|
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
|
|
|
}
|