1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-07 18:46:06 +01:00
LibrePilot/ground/openpilotgcs/src/plugins/setupwizard/pages/outputpage.cpp
Fredrik Arvidsson 98b5bc305b OP-39 Re-factored the configuration code to be implemented in a separate helper class to enable it to be used in a better and more stand alone way. The actual wizard class does not contain any uavo configuration code at all now.
Added an interface that provides all configuration parameters for a vehicle.
Changed the default ESC to Rapid instead of Default 50Hz. Default ESC was renamed to Legacy ESC.
Started to implement mixer configuration.
Started to implement flight mode configuration code.
Cleaned up some code and removed warnings.
2012-08-17 00:47:31 +02:00

56 lines
1.5 KiB
C++

/**
******************************************************************************
*
* @file outputpage.cpp
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012.
* @addtogroup
* @{
* @addtogroup OutputPage
* @{
* @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 "outputpage.h"
#include "ui_outputpage.h"
#include "setupwizard.h"
OutputPage::OutputPage(SetupWizard *wizard, QWidget *parent) :
AbstractWizardPage(wizard, parent),
ui(new Ui::OutputPage)
{
ui->setupUi(this);
}
OutputPage::~OutputPage()
{
delete ui;
}
bool OutputPage::validatePage()
{
if(ui->rapidESCButton->isChecked()) {
getWizard()->setESCType(SetupWizard::ESC_RAPID);
}
else {
getWizard()->setESCType(SetupWizard::ESC_LEGACY);
}
return true;
}