mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-03-01 18:29:16 +01:00
Added some more wizard pages. The basic structure for multirotors is in place.
This commit is contained in:
parent
348cdfaed7
commit
e891cd2dc3
@ -78,6 +78,7 @@ bool ControllerPage::isComplete() const
|
||||
bool ControllerPage::validatePage()
|
||||
{
|
||||
getWizard()->setControllerType((SetupWizard::CONTROLLER_TYPE)ui->boardTypeCombo->itemData(ui->boardTypeCombo->currentIndex()).toInt());
|
||||
getWizard()->setControllerSelectionMode(ui->manualCB->isChecked() ? SetupWizard::CONTROLLER_SELECTION_MANUAL : SetupWizard::CONTROLLER_SELECTION_AUTOMATIC);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -115,13 +116,13 @@ void ControllerPage::setupDeviceList()
|
||||
void ControllerPage::setupBoardTypes()
|
||||
{
|
||||
QVariant v(0);
|
||||
ui->boardTypeCombo->addItem("<Unknown>", SetupWizard::CONTROLLER_UNKNOWN);
|
||||
ui->boardTypeCombo->addItem("OpenPilot CopterControl (CC)", SetupWizard::CONTROLLER_CC);
|
||||
ui->boardTypeCombo->addItem("OpenPilot CopterControl (CC3D)", SetupWizard::CONTROLLER_CC3D);
|
||||
ui->boardTypeCombo->addItem("OpenPilot Revolution", SetupWizard::CONTROLLER_REVO);
|
||||
ui->boardTypeCombo->model()->setData(ui->boardTypeCombo->model()->index(ui->boardTypeCombo->count() - 1, 0), v, Qt::UserRole - 1);
|
||||
ui->boardTypeCombo->addItem("OP PipX Modem", SetupWizard::CONTROLLER_PIPX);
|
||||
ui->boardTypeCombo->model()->setData(ui->boardTypeCombo->model()->index(ui->boardTypeCombo->count() - 1, 0), v, Qt::UserRole - 1);
|
||||
ui->boardTypeCombo->addItem(tr("<Unknown>"), SetupWizard::CONTROLLER_UNKNOWN);
|
||||
ui->boardTypeCombo->addItem(tr("OpenPilot CopterControl"), SetupWizard::CONTROLLER_CC);
|
||||
ui->boardTypeCombo->addItem(tr("OpenPilot CopterControl 3D"), SetupWizard::CONTROLLER_CC3D);
|
||||
ui->boardTypeCombo->addItem(tr("OpenPilot Revolution"), SetupWizard::CONTROLLER_REVO);
|
||||
//ui->boardTypeCombo->model()->setData(ui->boardTypeCombo->model()->index(ui->boardTypeCombo->count() - 1, 0), v, Qt::UserRole - 1);
|
||||
ui->boardTypeCombo->addItem(tr("OpenPilot PipX Radio Modem"), SetupWizard::CONTROLLER_PIPX);
|
||||
//ui->boardTypeCombo->model()->setData(ui->boardTypeCombo->model()->index(ui->boardTypeCombo->count() - 1, 0), v, Qt::UserRole - 1);
|
||||
}
|
||||
|
||||
void ControllerPage::setControllerType(SetupWizard::CONTROLLER_TYPE type)
|
||||
@ -201,12 +202,12 @@ void ControllerPage::identificationModeChanged()
|
||||
ui->boardTypeCombo->setEnabled(true);
|
||||
ui->connectButton->setEnabled(false);
|
||||
ui->boardTypeCombo->setCurrentIndex(1);
|
||||
ui->boardTypeCombo->model()->setData(ui->boardTypeCombo->model()->index(0, 0), QVariant(0), Qt::UserRole - 1);
|
||||
//ui->boardTypeCombo->model()->setData(ui->boardTypeCombo->model()->index(0, 0), QVariant(0), Qt::UserRole - 1);
|
||||
}
|
||||
else {
|
||||
ui->connectButton->setEnabled(ui->deviceCombo->count() > 0);
|
||||
ui->deviceCombo->setEnabled(!m_connectionManager->isConnected());
|
||||
ui->boardTypeCombo->model()->setData(ui->boardTypeCombo->model()->index(0, 0), QVariant(1), Qt::UserRole - 1);
|
||||
//ui->boardTypeCombo->model()->setData(ui->boardTypeCombo->model()->index(0, 0), QVariant(1), Qt::UserRole - 1);
|
||||
ui->boardTypeCombo->setCurrentIndex(0);
|
||||
ui->boardTypeCombo->setEnabled(false);
|
||||
}
|
||||
|
@ -25,7 +25,7 @@
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
<width>550</width>
|
||||
<height>141</height>
|
||||
<height>281</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -33,13 +33,15 @@
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">Setup complete</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">The wizard have now gathered enough information to create a baseline configuration for your OpenPilot controller board to use with your vehicle.</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">Congratulations!</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">Setup wizard is completed.</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt; font-weight:600;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">This part of the setup procedure is now complete and you are one step away from having a complete setup of your OpenPilot controller.</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">You now have two choices:</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">- Upload configuration directly to the currently connected OpenPilot controller board.</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">- Save the configuration to a file for later uploading using the configuration import plugin in GCS.</span></p></body></html></string>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">To complete the setup please push the Input Wizard button below to close this wizard and go directly to the Input Wizard.</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">Or close this wizard and go to the Input tab in the Configuration Plugin and run the wizard to configure the input signals to be used before trying to operate your vehicle. If you already have performed the Input configuration you can skip this step. </span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"></p></body></html></string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
@ -48,30 +50,17 @@ p, li { white-space: pre-wrap; }
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="saveButton">
|
||||
<widget class="QPushButton" name="inputWizardButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>420</x>
|
||||
<y>290</y>
|
||||
<width>125</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Save configuration...</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="uploadButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>420</x>
|
||||
<x>430</x>
|
||||
<y>340</y>
|
||||
<width>125</width>
|
||||
<width>131</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Upload configuration</string>
|
||||
<string>Go to Input Wizard...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
|
@ -0,0 +1,48 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
*
|
||||
* @file flashpage.cpp
|
||||
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012.
|
||||
* @addtogroup
|
||||
* @{
|
||||
* @addtogroup FlashPage
|
||||
* @{
|
||||
* @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 "flashpage.h"
|
||||
#include "ui_flashpage.h"
|
||||
#include "setupwizard.h"
|
||||
|
||||
FlashPage::FlashPage(SetupWizard *wizard, QWidget *parent) :
|
||||
AbstractWizardPage(wizard, parent),
|
||||
|
||||
ui(new Ui::FlashPage)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
FlashPage::~FlashPage()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
bool FlashPage::validatePage()
|
||||
{
|
||||
return true;
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
*
|
||||
* @file flashpage.h
|
||||
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012.
|
||||
* @addtogroup
|
||||
* @{
|
||||
* @addtogroup FlashPage
|
||||
* @{
|
||||
* @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
|
||||
*/
|
||||
|
||||
#ifndef FLASHPAGE_H
|
||||
#define FLASHPAGE_H
|
||||
|
||||
#include "abstractwizardpage.h"
|
||||
|
||||
namespace Ui {
|
||||
class FlashPage;
|
||||
}
|
||||
|
||||
class FlashPage : public AbstractWizardPage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit FlashPage(SetupWizard *wizard, QWidget *parent = 0);
|
||||
~FlashPage();
|
||||
bool validatePage();
|
||||
|
||||
private:
|
||||
Ui::FlashPage *ui;
|
||||
};
|
||||
|
||||
#endif // FLASHPAGE_H
|
@ -0,0 +1,70 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>FlashPage</class>
|
||||
<widget class="QWizardPage" name="FlashPage">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>600</width>
|
||||
<height>400</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>WizardPage</string>
|
||||
</property>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
<width>541</width>
|
||||
<height>201</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">OpenPilot configuration ready to save</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt; font-weight:600;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">The wizard is now ready to write the configuration directly to your OpenPilot controller. This is only possible if the controller is connected and identified in the first step of this wizard. If the controller is not connected, or if the controller type was selected manually you can instead of writing the configuration to the controller save it to disk for later use.</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">If any of the selections made in this wizard requires a reboot of the controller then that will be performed in this step.</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">If you by any reason do not want to write the configuration directly to the controller you can choose to save the configuration to disk and then exit this wizard.</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>240</y>
|
||||
<width>561</width>
|
||||
<height>141</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Write configuration to controller or save</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
@ -0,0 +1,64 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
*
|
||||
* @file inputpage.cpp
|
||||
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012.
|
||||
* @addtogroup
|
||||
* @{
|
||||
* @addtogroup InputPage
|
||||
* @{
|
||||
* @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 "inputpage.h"
|
||||
#include "ui_inputpage.h"
|
||||
#include "setupwizard.h"
|
||||
|
||||
InputPage::InputPage(SetupWizard *wizard, QWidget *parent) :
|
||||
AbstractWizardPage(wizard, parent),
|
||||
|
||||
ui(new Ui::InputPage)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
InputPage::~InputPage()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
bool InputPage::validatePage()
|
||||
{
|
||||
if(ui->pwmButton->isChecked()) {
|
||||
getWizard()->setInputType(SetupWizard::INPUT_PWM);
|
||||
}
|
||||
else if(ui->ppmButton->isChecked()) {
|
||||
getWizard()->setInputType(SetupWizard::INPUT_PPM);
|
||||
}
|
||||
else if(ui->sbusButton->isChecked()) {
|
||||
getWizard()->setInputType(SetupWizard::INPUT_SBUS);
|
||||
}
|
||||
else if(ui->spectrumButton->isChecked()) {
|
||||
getWizard()->setInputType(SetupWizard::INPUT_DSM);
|
||||
}
|
||||
else {
|
||||
getWizard()->setInputType(SetupWizard::INPUT_PWM);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
*
|
||||
* @file inputpage.h
|
||||
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012.
|
||||
* @addtogroup
|
||||
* @{
|
||||
* @addtogroup InputPage
|
||||
* @{
|
||||
* @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
|
||||
*/
|
||||
|
||||
#ifndef INPUTPAGE_H
|
||||
#define INPUTPAGE_H
|
||||
|
||||
#include "abstractwizardpage.h"
|
||||
|
||||
namespace Ui {
|
||||
class InputPage;
|
||||
}
|
||||
|
||||
class InputPage : public AbstractWizardPage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit InputPage(SetupWizard *wizard, QWidget *parent = 0);
|
||||
~InputPage();
|
||||
bool validatePage();
|
||||
|
||||
private:
|
||||
Ui::InputPage *ui;
|
||||
};
|
||||
|
||||
#endif // INPUTPAGE_H
|
177
ground/openpilotgcs/src/plugins/setupwizard/pages/inputpage.ui
Normal file
177
ground/openpilotgcs/src/plugins/setupwizard/pages/inputpage.ui
Normal file
@ -0,0 +1,177 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>InputPage</class>
|
||||
<widget class="QWizardPage" name="InputPage">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>600</width>
|
||||
<height>400</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>WizardPage</string>
|
||||
</property>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
<width>541</width>
|
||||
<height>171</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">OpenPilot basic input signal configuration</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt; font-weight:600;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">The OpenPilot controller supports many different types of input signals. Please select the type of input that matches your Receiver configuration. If you are unsure leave the default option selected and continue the wizard.</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">Some input options require the OpenPilot controller to be rebooted before the changes can take place. If an option that requires a reboot is selected the controller will be rebooted at the end of this wizard after the configuration is written to the controller.</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>200</y>
|
||||
<width>561</width>
|
||||
<height>181</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Supported input signal types</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<widget class="QPushButton" name="pwmButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>50</x>
|
||||
<y>40</y>
|
||||
<width>100</width>
|
||||
<height>100</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Tricopter, Quadcopter, Hexacopter, Octocopter</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>PWM
|
||||
One cable
|
||||
per channel</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="autoExclusive">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="ppmButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>170</x>
|
||||
<y>40</y>
|
||||
<width>100</width>
|
||||
<height>100</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Airplane, Sloper, Jet</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>PPM
|
||||
One cable
|
||||
for all channels</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="autoExclusive">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="sbusButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>290</x>
|
||||
<y>40</y>
|
||||
<width>100</width>
|
||||
<height>100</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Airplane, Sloper, Jet</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Futaba
|
||||
S.Bus</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="autoExclusive">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="spectrumButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>410</x>
|
||||
<y>40</y>
|
||||
<width>100</width>
|
||||
<height>100</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Airplane, Sloper, Jet</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Spectrum
|
||||
Satellite</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="autoExclusive">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
@ -0,0 +1,48 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
*
|
||||
* @file levellingpage.cpp
|
||||
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012.
|
||||
* @addtogroup
|
||||
* @{
|
||||
* @addtogroup LevellingPage
|
||||
* @{
|
||||
* @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 "levellingpage.h"
|
||||
#include "ui_levellingpage.h"
|
||||
#include "setupwizard.h"
|
||||
|
||||
LevellingPage::LevellingPage(SetupWizard *wizard, QWidget *parent) :
|
||||
AbstractWizardPage(wizard, parent),
|
||||
|
||||
ui(new Ui::LevellingPage)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
LevellingPage::~LevellingPage()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
bool LevellingPage::validatePage()
|
||||
{
|
||||
return true;
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
*
|
||||
* @file levellingpage.h
|
||||
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012.
|
||||
* @addtogroup
|
||||
* @{
|
||||
* @addtogroup LevellingPage
|
||||
* @{
|
||||
* @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
|
||||
*/
|
||||
|
||||
#ifndef LEVELLINGPAGE_H
|
||||
#define LEVELLINGPAGE_H
|
||||
|
||||
#include "abstractwizardpage.h"
|
||||
|
||||
namespace Ui {
|
||||
class LevellingPage;
|
||||
}
|
||||
|
||||
class LevellingPage : public AbstractWizardPage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit LevellingPage(SetupWizard *wizard, QWidget *parent = 0);
|
||||
~LevellingPage();
|
||||
bool validatePage();
|
||||
|
||||
private:
|
||||
Ui::LevellingPage *ui;
|
||||
};
|
||||
|
||||
#endif // LEVELLINGPAGE_H
|
@ -0,0 +1,96 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>LevellingPage</class>
|
||||
<widget class="QWizardPage" name="LevellingPage">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>600</width>
|
||||
<height>400</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>WizardPage</string>
|
||||
</property>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
<width>541</width>
|
||||
<height>201</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">OpenPilot controller levelling procedure</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt; font-weight:600;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">This step can only be performed if you have the OpenPilot controller connected and identified by the first step in this wizard.</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">The wizard needs to get information from the controller about in which position the vehicle normally is considered to be level. To be able to successfully perform these measurements you need to place the vehicle on a flat and as level as possible surface. Example of such surfaces could be a table top or the floor. Be careful to assure that the vehicle really is level since this step will affect the accelerometer and gyro bias in the controller software.</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">To perform the levelling, please push the Level button and wait for the process to finish.</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>250</y>
|
||||
<width>561</width>
|
||||
<height>131</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Accelerometer and gyro bias measurement</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<widget class="QProgressBar" name="progressBar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>90</y>
|
||||
<width>531</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>424</x>
|
||||
<y>40</y>
|
||||
<width>91</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Level...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
@ -0,0 +1,55 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
*
|
||||
* @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_DEFAULT);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
*
|
||||
* @file outputpage.h
|
||||
* @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
|
||||
*/
|
||||
|
||||
#ifndef OUTPUTPAGE_H
|
||||
#define OUTPUTPAGE_H
|
||||
|
||||
#include "abstractwizardpage.h"
|
||||
|
||||
namespace Ui {
|
||||
class OutputPage;
|
||||
}
|
||||
|
||||
class OutputPage : public AbstractWizardPage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit OutputPage(SetupWizard *wizard, QWidget *parent = 0);
|
||||
~OutputPage();
|
||||
bool validatePage();
|
||||
|
||||
private:
|
||||
Ui::OutputPage *ui;
|
||||
};
|
||||
|
||||
#endif // OUTPUTPAGE_H
|
123
ground/openpilotgcs/src/plugins/setupwizard/pages/outputpage.ui
Normal file
123
ground/openpilotgcs/src/plugins/setupwizard/pages/outputpage.ui
Normal file
@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>OutputPage</class>
|
||||
<widget class="QWizardPage" name="OutputPage">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>600</width>
|
||||
<height>400</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>WizardPage</string>
|
||||
</property>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
<width>541</width>
|
||||
<height>151</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">OpenPilot basic output signal configuration</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt; font-weight:600;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">To set an optimal configuration of the output signals powering your motors used by your OpenPilot controller the wizard needs to know what type of Electronic Speed Controllers (ESC) you will use and what their capabilities are.</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">Please select one of the options below. If you are unsure about the capabilities of your ESC:s just leave the default option selected and continue the wizard.</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>200</y>
|
||||
<width>561</width>
|
||||
<height>181</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Supported speed controller types</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<widget class="QPushButton" name="defaultESCButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>50</x>
|
||||
<y>40</y>
|
||||
<width>100</width>
|
||||
<height>100</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Tricopter, Quadcopter, Hexacopter, Octocopter</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Default ESC
|
||||
50 Hz</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="autoExclusive">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="rapidESCButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>170</x>
|
||||
<y>40</y>
|
||||
<width>100</width>
|
||||
<height>100</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Airplane, Sloper, Jet</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Rapid ESC
|
||||
400 Hz</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="autoExclusive">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
@ -0,0 +1,52 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
*
|
||||
* @file summarypage.cpp
|
||||
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012.
|
||||
* @addtogroup
|
||||
* @{
|
||||
* @addtogroup SummaryPage
|
||||
* @{
|
||||
* @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 "summarypage.h"
|
||||
#include "ui_summarypage.h"
|
||||
#include "setupwizard.h"
|
||||
|
||||
SummaryPage::SummaryPage(SetupWizard *wizard, QWidget *parent) :
|
||||
AbstractWizardPage(wizard, parent),
|
||||
ui(new Ui::SummaryPage)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
SummaryPage::~SummaryPage()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
bool SummaryPage::validatePage()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void SummaryPage::initializePage()
|
||||
{
|
||||
ui->configurationSummary->setText(getWizard()->getSummaryText());
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
*
|
||||
* @file summarypage.h
|
||||
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012.
|
||||
* @addtogroup
|
||||
* @{
|
||||
* @addtogroup SummaryPage
|
||||
* @{
|
||||
* @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
|
||||
*/
|
||||
|
||||
#ifndef SUMMARYPAGE_H
|
||||
#define SUMMARYPAGE_H
|
||||
|
||||
#include "abstractwizardpage.h"
|
||||
|
||||
namespace Ui {
|
||||
class SummaryPage;
|
||||
}
|
||||
|
||||
class SummaryPage : public AbstractWizardPage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SummaryPage(SetupWizard *wizard, QWidget *parent = 0);
|
||||
~SummaryPage();
|
||||
bool validatePage();
|
||||
void initializePage();
|
||||
|
||||
private:
|
||||
Ui::SummaryPage *ui;
|
||||
};
|
||||
|
||||
#endif // SUMMARYPAGE_H
|
124
ground/openpilotgcs/src/plugins/setupwizard/pages/summarypage.ui
Normal file
124
ground/openpilotgcs/src/plugins/setupwizard/pages/summarypage.ui
Normal file
@ -0,0 +1,124 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>SummaryPage</class>
|
||||
<widget class="QWizardPage" name="SummaryPage">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>600</width>
|
||||
<height>400</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>WizardPage</string>
|
||||
</property>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
<width>541</width>
|
||||
<height>211</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">OpenPilot configuration summary</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt; font-weight:600;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">The first part of this wizard is now complete. The information required to create a basic OpenPilot controller configuration has been collected and a configuration can be created and saved.</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">Below is a summary of the configuration and a button that links to a schematic picture illustrating how to connect selected hardware and the OpenPilotController with the current configuration.</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">To complete the wizard and write the confguration directly to the OpenPilot controller, or if no OpenPilotController is connected save the configuration to disk for later usage, please continue to the next and last step of this wizard.</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>240</y>
|
||||
<width>561</width>
|
||||
<height>140</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Summary of configuration</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<widget class="QPushButton" name="illustrationButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>440</x>
|
||||
<y>20</y>
|
||||
<width>100</width>
|
||||
<height>100</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Tricopter, Quadcopter, Hexacopter, Octocopter</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Hardware
|
||||
Configuration
|
||||
Illustration</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="autoExclusive">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QTextEdit" name="configurationSummary">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
<width>400</width>
|
||||
<height>100</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="verticalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOn</enum>
|
||||
</property>
|
||||
<property name="horizontalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
@ -34,13 +34,21 @@
|
||||
#include "pages/fixedwingpage.h"
|
||||
#include "pages/helipage.h"
|
||||
#include "pages/surfacepage.h"
|
||||
#include "pages/inputpage.h"
|
||||
#include "pages/outputpage.h"
|
||||
#include "pages/levellingpage.h"
|
||||
#include "pages/summarypage.h"
|
||||
#include "pages/flashpage.h"
|
||||
#include "pages/notyetimplementedpage.h"
|
||||
|
||||
SetupWizard::SetupWizard(QWidget *parent) : QWizard(parent)
|
||||
{
|
||||
setWindowTitle("OpenPilot Setup Wizard");
|
||||
m_controllerSelectionMode = CONTROLLER_SELECTION_UNKNOWN;
|
||||
m_controllerType = CONTROLLER_UNKNOWN;
|
||||
m_vehicleType = VEHICLE_UNKNOWN;
|
||||
m_escType = ESC_UNKNOWN;
|
||||
m_inputType = INPUT_UNKNOWN;
|
||||
createPages();
|
||||
}
|
||||
|
||||
@ -55,6 +63,8 @@ int SetupWizard::nextId() const
|
||||
case CONTROLLER_CC:
|
||||
case CONTROLLER_CC3D:
|
||||
return PAGE_VEHICLES;
|
||||
case CONTROLLER_REVO:
|
||||
case CONTROLLER_PIPX:
|
||||
default:
|
||||
return PAGE_NOTYETIMPLEMENTED;
|
||||
}
|
||||
@ -62,19 +72,35 @@ int SetupWizard::nextId() const
|
||||
case PAGE_VEHICLES: {
|
||||
switch(getVehicleType())
|
||||
{
|
||||
case VEHICLE_MULTI:
|
||||
return PAGE_MULTI;
|
||||
case VEHICLE_FIXEDWING:
|
||||
return PAGE_FIXEDWING;
|
||||
case VEHICLE_HELI:
|
||||
return PAGE_HELI;
|
||||
case VEHICLE_SURFACE:
|
||||
return PAGE_SURFACE;
|
||||
case VEHICLE_MULTI:
|
||||
return PAGE_MULTI;
|
||||
default:
|
||||
return PAGE_NOTYETIMPLEMENTED;
|
||||
}
|
||||
}
|
||||
case PAGE_MULTI:
|
||||
return PAGE_INPUT;
|
||||
case PAGE_INPUT:
|
||||
return PAGE_OUTPUT;
|
||||
case PAGE_OUTPUT:
|
||||
{
|
||||
if(getControllerSelectionMode() == CONTROLLER_SELECTION_AUTOMATIC) {
|
||||
return PAGE_LEVELLING;
|
||||
} else {
|
||||
return PAGE_SUMMARY;
|
||||
}
|
||||
}
|
||||
case PAGE_LEVELLING:
|
||||
return PAGE_SUMMARY;
|
||||
case PAGE_SUMMARY:
|
||||
return PAGE_FLASH;
|
||||
case PAGE_FLASH:
|
||||
return PAGE_END;
|
||||
case PAGE_NOTYETIMPLEMENTED:
|
||||
return PAGE_END;
|
||||
@ -83,6 +109,85 @@ int SetupWizard::nextId() const
|
||||
}
|
||||
}
|
||||
|
||||
QString SetupWizard::getSummaryText()
|
||||
{
|
||||
QString summary = "";
|
||||
summary.append(tr("Controller type: "));
|
||||
switch(getControllerType())
|
||||
{
|
||||
case CONTROLLER_CC:
|
||||
summary.append(tr("OpenPilot CopterControl"));
|
||||
break;
|
||||
case CONTROLLER_CC3D:
|
||||
summary.append(tr("OpenPilot CopterControl 3D"));
|
||||
break;
|
||||
case CONTROLLER_REVO:
|
||||
summary.append(tr("OpenPilot Revolution"));
|
||||
break;
|
||||
case CONTROLLER_PIPX:
|
||||
summary.append(tr("OpenPilot PipX Radio Modem"));
|
||||
break;
|
||||
default:
|
||||
summary.append(tr("Unknown"));
|
||||
break;
|
||||
}
|
||||
|
||||
summary.append('\n');
|
||||
summary.append(tr("Vehicle type: "));
|
||||
switch (getVehicleType())
|
||||
{
|
||||
case VEHICLE_MULTI:
|
||||
summary.append(tr("Multirotor"));
|
||||
break;
|
||||
case VEHICLE_FIXEDWING:
|
||||
summary.append(tr("Fixed wing"));
|
||||
break;
|
||||
case VEHICLE_HELI:
|
||||
summary.append(tr("Helicopter"));
|
||||
break;
|
||||
case VEHICLE_SURFACE:
|
||||
summary.append(tr("Surface vehicle"));
|
||||
break;
|
||||
default:
|
||||
summary.append(tr("Unknown"));
|
||||
}
|
||||
|
||||
summary.append('\n');
|
||||
summary.append(tr("Input type: "));
|
||||
switch (getInputType())
|
||||
{
|
||||
case INPUT_PWM:
|
||||
summary.append(tr("PWM (One cable per channel)"));
|
||||
break;
|
||||
case INPUT_PPM:
|
||||
summary.append(tr("PPM (One cable for all channels)"));
|
||||
break;
|
||||
case INPUT_SBUS:
|
||||
summary.append(tr("Futaba S.Bus"));
|
||||
break;
|
||||
case INPUT_DSM:
|
||||
summary.append(tr("Spectrum satellite"));
|
||||
break;
|
||||
default:
|
||||
summary.append(tr("Unknown"));
|
||||
}
|
||||
|
||||
summary.append('\n');
|
||||
summary.append(tr("ESC type: "));
|
||||
switch (getInputType())
|
||||
{
|
||||
case ESC_DEFAULT:
|
||||
summary.append(tr("Default ESC (50 Hz)"));
|
||||
break;
|
||||
case ESC_RAPID:
|
||||
summary.append(tr("Rapid ESC (400 Hz)"));
|
||||
break;
|
||||
default:
|
||||
summary.append(tr("Unknown"));
|
||||
}
|
||||
return summary;
|
||||
}
|
||||
|
||||
void SetupWizard::createPages()
|
||||
{
|
||||
setPage(PAGE_START, new StartPage(this));
|
||||
@ -92,6 +197,11 @@ void SetupWizard::createPages()
|
||||
setPage(PAGE_FIXEDWING, new FixedWingPage(this));
|
||||
setPage(PAGE_HELI, new HeliPage(this));
|
||||
setPage(PAGE_SURFACE, new SurfacePage(this));
|
||||
setPage(PAGE_INPUT, new InputPage(this));
|
||||
setPage(PAGE_OUTPUT, new OutputPage(this));
|
||||
setPage(PAGE_LEVELLING, new LevellingPage(this));
|
||||
setPage(PAGE_SUMMARY, new SummaryPage(this));
|
||||
setPage(PAGE_FLASH, new FlashPage(this));
|
||||
setPage(PAGE_NOTYETIMPLEMENTED, new NotYetImplementedPage(this));
|
||||
setPage(PAGE_END, new EndPage(this));
|
||||
|
||||
|
@ -37,11 +37,17 @@ class SetupWizard : public QWizard
|
||||
public:
|
||||
SetupWizard(QWidget *parent = 0);
|
||||
int nextId() const;
|
||||
enum CONTROLLER_SELECTION_MODE {CONTROLLER_SELECTION_AUTOMATIC, CONTROLLER_SELECTION_MANUAL, CONTROLLER_SELECTION_UNKNOWN};
|
||||
enum CONTROLLER_TYPE {CONTROLLER_UNKNOWN, CONTROLLER_CC, CONTROLLER_CC3D, CONTROLLER_REVO, CONTROLLER_PIPX};
|
||||
enum VEHICLE_TYPE {VEHICLE_UNKNOWN, VEHICLE_MULTI, VEHICLE_FIXEDWING, VEHICLE_HELI, VEHICLE_SURFACE};
|
||||
enum MULTI_ROTOR_SUB_TYPE {MULTI_ROTOR_UNKNOWN, MULTI_ROTOR_TRI_Y, MULTI_ROTOR_QUAD_X, MULTI_ROTOR_QUAD_PLUS,
|
||||
MULTI_ROTOR_HEXA, MULTI_ROTOR_HEXA_H, MULTI_ROTOR_HEXA_COAX_Y, MULTI_ROTOR_OCTO,
|
||||
MULTI_ROTOR_OCTO_V, MULTI_ROTOR_OCTO_COAX_X, MULTI_ROTOR_OCTO_COAX_PLUS};
|
||||
enum ESC_TYPE {ESC_DEFAULT, ESC_RAPID, ESC_UNKNOWN};
|
||||
enum INPUT_TYPE {INPUT_PWM, INPUT_PPM, INPUT_SBUS, INPUT_DSM, INPUT_UNKNOWN};
|
||||
|
||||
void setControllerSelectionMode(SetupWizard::CONTROLLER_SELECTION_MODE mode) { m_controllerSelectionMode = mode; }
|
||||
SetupWizard::CONTROLLER_SELECTION_MODE getControllerSelectionMode() const { return m_controllerSelectionMode; }
|
||||
|
||||
void setControllerType(SetupWizard::CONTROLLER_TYPE type) { m_controllerType = type; }
|
||||
SetupWizard::CONTROLLER_TYPE getControllerType() const { return m_controllerType; }
|
||||
@ -49,13 +55,25 @@ public:
|
||||
void setVehicleType(SetupWizard::VEHICLE_TYPE type) { m_vehicleType = type; }
|
||||
SetupWizard::VEHICLE_TYPE getVehicleType() const { return m_vehicleType; }
|
||||
|
||||
void setInputType(SetupWizard::INPUT_TYPE type) { m_inputType = type; }
|
||||
SetupWizard::INPUT_TYPE getInputType() const { return m_inputType; }
|
||||
|
||||
void setESCType(SetupWizard::ESC_TYPE type) { m_escType = type; }
|
||||
SetupWizard::ESC_TYPE getESCType() const { return m_escType; }
|
||||
|
||||
QString getSummaryText();
|
||||
|
||||
private:
|
||||
enum {PAGE_START, PAGE_CONTROLLER, PAGE_VEHICLES, PAGE_MULTI, PAGE_FIXEDWING,
|
||||
PAGE_HELI, PAGE_SURFACE, PAGE_NOTYETIMPLEMENTED, PAGE_END};
|
||||
PAGE_HELI, PAGE_SURFACE, PAGE_INPUT, PAGE_OUTPUT, PAGE_LEVELLING,
|
||||
PAGE_FLASH, PAGE_SUMMARY, PAGE_NOTYETIMPLEMENTED, PAGE_END};
|
||||
void createPages();
|
||||
|
||||
CONTROLLER_SELECTION_MODE m_controllerSelectionMode;
|
||||
CONTROLLER_TYPE m_controllerType;
|
||||
VEHICLE_TYPE m_vehicleType;
|
||||
INPUT_TYPE m_inputType;
|
||||
ESC_TYPE m_escType;
|
||||
};
|
||||
|
||||
#endif // SETUPWIZARD_H
|
||||
|
@ -18,8 +18,14 @@ HEADERS += setupwizardplugin.h \
|
||||
pages/fixedwingpage.h \
|
||||
pages/helipage.h \
|
||||
pages/surfacepage.h \
|
||||
pages/abstractwizardpage.h
|
||||
SOURCES += setupwizardplugin.cpp \
|
||||
pages/abstractwizardpage.h \
|
||||
pages/outputpage.h \
|
||||
pages/inputpage.h \
|
||||
pages/summarypage.h \
|
||||
pages/flashpage.h \
|
||||
pages/levellingpage.h
|
||||
|
||||
SOURCES += setupwizardplugin.cpp \
|
||||
setupwizard.cpp \
|
||||
pages/startpage.cpp \
|
||||
pages/endpage.cpp \
|
||||
@ -30,8 +36,13 @@ SOURCES += setupwizardplugin.cpp \
|
||||
pages/fixedwingpage.cpp \
|
||||
pages/helipage.cpp \
|
||||
pages/surfacepage.cpp \
|
||||
pages/abstractwizardpage.cpp
|
||||
|
||||
pages/abstractwizardpage.cpp \
|
||||
pages/outputpage.cpp \
|
||||
pages/inputpage.cpp \
|
||||
pages/summarypage.cpp \
|
||||
pages/flashpage.cpp \
|
||||
pages/levellingpage.cpp
|
||||
|
||||
OTHER_FILES += SetupWizard.pluginspec
|
||||
|
||||
FORMS += \
|
||||
@ -43,7 +54,12 @@ FORMS += \
|
||||
pages/multipage.ui \
|
||||
pages/fixedwingpage.ui \
|
||||
pages/helipage.ui \
|
||||
pages/surfacepage.ui
|
||||
pages/surfacepage.ui \
|
||||
pages/outputpage.ui \
|
||||
pages/inputpage.ui \
|
||||
pages/summarypage.ui \
|
||||
pages/flashpage.ui \
|
||||
pages/levellingpage.ui
|
||||
|
||||
RESOURCES += \
|
||||
wizardResources.qrc
|
||||
|
Loading…
x
Reference in New Issue
Block a user