LP-106 Setup Wizard refresh : Add dual servo setup (dual aileron or
[librepilot.git] / ground / gcs / src / plugins / setupwizard / pages / gpspage.cpp
blob448d4bb9140e6cc32a0c3ff75a1ea9b586c6fbd7
1 /**
2 ******************************************************************************
4 * @file fixedwingpage.cpp
5 * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012.
6 * @addtogroup
7 * @{
8 * @addtogroup FixedWingPage
9 * @{
10 * @brief
11 *****************************************************************************/
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 3 of the License, or
16 * (at your option) any later version.
18 * This program is distributed in the hope that it will be useful, but
19 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
20 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 * for more details.
23 * You should have received a copy of the GNU General Public License along
24 * with this program; if not, write to the Free Software Foundation, Inc.,
25 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28 #include "gpspage.h"
29 #include "setupwizard.h"
31 GpsPage::GpsPage(SetupWizard *wizard, QWidget *parent) :
32 SelectionPage(wizard, QString(":/setupwizard/resources/sensor-shapes.svg"), parent)
35 GpsPage::~GpsPage()
38 void GpsPage::initializePage(VehicleConfigurationSource *settings)
40 Q_UNUSED(settings);
43 bool GpsPage::validatePage(SelectionItem *selectedItem)
45 getWizard()->setGpsType((SetupWizard::GPS_TYPE)selectedItem->id());
46 if (getWizard()->getGpsType() == SetupWizard::GPS_DISABLED) {
47 getWizard()->setAirspeedType(VehicleConfigurationSource::AIRSPEED_DISABLED);
49 return true;
52 void GpsPage::setupSelection(Selection *selection)
54 selection->setTitle(tr("GPS Selection"));
55 selection->setText(tr("Please select the type of GPS you wish to use. As well as OpenPilot hardware, "
56 "3rd party GPSs are supported also, although please note that performance could "
57 "be less than optimal as not all GPSs are created equal.\n\n"
58 "Note: NMEA only GPSs perform poorly on VTOL aircraft and are not recommended for Helis and MultiRotors.\n\n"
59 "Please select your GPS type data below:"));
61 selection->addItem(tr("Disabled"),
62 tr("GPS Features are not to be enabled"),
63 "no-gps",
64 SetupWizard::GPS_DISABLED);
66 selection->addItem(tr("OpenPilot Platinum"),
67 tr("Select this option to use the OpenPilot Platinum GPS with integrated Magnetometer "
68 "and Microcontroller.\n\n"
69 "Note: for the OpenPilot v8 GPS please select the U-Blox option."),
70 "OPGPS-v9",
71 SetupWizard::GPS_PLATINUM);
73 selection->addItem(tr("U-Blox Based"),
74 tr("Select this option for the OpenPilot V8 GPS or generic U-Blox chipset based GPS."),
75 "OPGPS-v8-ublox",
76 SetupWizard::GPS_UBX);
78 selection->addItem(tr("NMEA Based"),
79 tr("Select this option for a generic NMEA based GPS."),
80 "generic-nmea",
81 SetupWizard::GPS_NMEA);