1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-02 10:24:11 +01:00

OP-856 Basic renaming from PRO to Revolution

This commit is contained in:
Fredrik Arvidsson 2013-02-26 07:37:14 +01:00
parent ed83f282a5
commit e710f3bb91
5 changed files with 44 additions and 44 deletions

View File

@ -17,7 +17,6 @@ HEADERS += configplugin.h \
configinputwidget.h \
configoutputwidget.h \
configvehicletypewidget.h \
config_pro_hw_widget.h \
config_cc_hw_widget.h \
configccattitudewidget.h \
configpipxtremewidget.h \
@ -39,7 +38,8 @@ HEADERS += configplugin.h \
config_global.h \
mixercurve.h \
dblspindelegate.h \
configautotunewidget.h
configautotunewidget.h \
configrevohwwidget.h
SOURCES += configplugin.cpp \
configgadgetconfiguration.cpp \
configgadgetwidget.cpp \
@ -50,7 +50,6 @@ SOURCES += configplugin.cpp \
configinputwidget.cpp \
configoutputwidget.cpp \
configvehicletypewidget.cpp \
config_pro_hw_widget.cpp \
config_cc_hw_widget.cpp \
configccattitudewidget.cpp \
configstabilizationwidget.cpp \
@ -73,10 +72,10 @@ SOURCES += configplugin.cpp \
cfg_vehicletypes/vehicleconfig.cpp \
mixercurve.cpp \
dblspindelegate.cpp \
configautotunewidget.cpp
configautotunewidget.cpp \
configrevohwwidget.cpp
FORMS += airframe.ui \
cc_hw_settings.ui \
pro_hw_settings.ui \
ccpm.ui \
stabilization.ui \
input.ui \
@ -91,7 +90,8 @@ FORMS += airframe.ui \
txpid.ui \
pipxtreme.ui \
mixercurve.ui \
autotune.ui
autotune.ui \
configrevohwwidget.ui
RESOURCES += configgadget.qrc

View File

@ -35,7 +35,7 @@
#include "configautotunewidget.h"
#include "configcamerastabilizationwidget.h"
#include "configtxpidwidget.h"
#include "config_pro_hw_widget.h"
#include "configrevohwwidget.h"
#include "config_cc_hw_widget.h"
#include "configpipxtremewidget.h"
#include "configrevowidget.h"
@ -136,7 +136,7 @@ ConfigGadgetWidget::ConfigGadgetWidget(QWidget *parent) : QWidget(parent)
}
help = 0;
connect(ftw,SIGNAL(currentAboutToShow(int,bool*)),this,SLOT(tabAboutToChange(int,bool*)));//,Qt::BlockingQueuedConnection);
connect(ftw,SIGNAL(currentAboutToShow(int,bool*)), this, SLOT(tabAboutToChange(int,bool*)));
// Connect to the PipXStatus object updates
UAVObjectManager *objManager = pm->getObject<UAVObjectManager>();
@ -173,20 +173,21 @@ void ConfigGadgetWidget::resizeEvent(QResizeEvent *event)
void ConfigGadgetWidget::onAutopilotDisconnect() {
ftw->setCurrentIndex(ConfigGadgetWidget::hardware);
ftw->removeTab(ConfigGadgetWidget::sensors);
QIcon *icon = new QIcon();
icon->addFile(":/configgadget/images/ins_normal.png", QSize(), QIcon::Normal, QIcon::Off);
icon->addFile(":/configgadget/images/ins_selected.png", QSize(), QIcon::Selected, QIcon::Off);
QWidget *qwd = new DefaultAttitudeWidget(this);
ftw->removeTab(ConfigGadgetWidget::sensors);
ftw->insertTab(ConfigGadgetWidget::sensors, qwd, *icon, QString("INS"));
ftw->removeTab(ConfigGadgetWidget::hardware);
icon = new QIcon();
icon->addFile(":/configgadget/images/hardware_normal.png", QSize(), QIcon::Normal, QIcon::Off);
icon->addFile(":/configgadget/images/hardware_selected.png", QSize(), QIcon::Selected, QIcon::Off);
qwd = new DefaultHwSettingsWidget(this);
ftw->removeTab(ConfigGadgetWidget::hardware);
ftw->insertTab(ConfigGadgetWidget::hardware, qwd, *icon, QString("Hardware"));
ftw->setCurrentIndex(ConfigGadgetWidget::hardware);
emit autopilotDisconnected();
@ -203,40 +204,39 @@ void ConfigGadgetWidget::onAutopilotConnect() {
int board = utilMngr->getBoardModel();
if ((board & 0xff00) == 1024) {
// CopterControl family
// Delete the INS panel, replace with CC Panel:
ftw->setCurrentIndex(ConfigGadgetWidget::hardware);
ftw->removeTab(ConfigGadgetWidget::sensors);
QIcon *icon = new QIcon();
icon->addFile(":/configgadget/images/ins_normal.png", QSize(), QIcon::Normal, QIcon::Off);
icon->addFile(":/configgadget/images/ins_selected.png", QSize(), QIcon::Selected, QIcon::Off);
QWidget *qwd = new ConfigCCAttitudeWidget(this);
ftw->insertTab(ConfigGadgetWidget::sensors, qwd, *icon, QString("INS"));
ftw->removeTab(ConfigGadgetWidget::hardware);
ftw->removeTab(ConfigGadgetWidget::sensors);
ftw->insertTab(ConfigGadgetWidget::sensors, qwd, *icon, QString("CopterControl"));
icon = new QIcon();
icon->addFile(":/configgadget/images/hardware_normal.png", QSize(), QIcon::Normal, QIcon::Off);
icon->addFile(":/configgadget/images/hardware_selected.png", QSize(), QIcon::Selected, QIcon::Off);
qwd = new ConfigCCHWWidget(this);
ftw->removeTab(ConfigGadgetWidget::hardware);
ftw->insertTab(ConfigGadgetWidget::hardware, qwd, *icon, QString("Hardware"));
ftw->setCurrentIndex(ConfigGadgetWidget::hardware);
} else if ((board & 0xff00) == 0x0900) {
// Revolution sensor calibration
ftw->setCurrentIndex(ConfigGadgetWidget::hardware);
ftw->removeTab(ConfigGadgetWidget::sensors);
// Revolution family
QIcon *icon = new QIcon();
icon->addFile(":/configgadget/images/ins_normal.png", QSize(), QIcon::Normal, QIcon::Off);
icon->addFile(":/configgadget/images/ins_selected.png", QSize(), QIcon::Selected, QIcon::Off);
QWidget *qwd = new ConfigRevoWidget(this);
ftw->insertTab(ConfigGadgetWidget::sensors, qwd, *icon, QString("Revo"));
ftw->removeTab(ConfigGadgetWidget::hardware);
ftw->removeTab(ConfigGadgetWidget::sensors);
ftw->insertTab(ConfigGadgetWidget::sensors, qwd, *icon, QString("Revolution"));
icon = new QIcon();
icon->addFile(":/configgadget/images/hardware_normal.png", QSize(), QIcon::Normal, QIcon::Off);
icon->addFile(":/configgadget/images/hardware_selected.png", QSize(), QIcon::Normal, QIcon::On);
qwd = new ConfigProHWWidget(this);
qwd = new ConfigRevoHWWidget(this);
ftw->removeTab(ConfigGadgetWidget::hardware);
ftw->insertTab(ConfigGadgetWidget::hardware, qwd, *icon, QString("Hardware"));
ftw->setCurrentIndex(ConfigGadgetWidget::hardware);
} else {
//Unknown board

View File

@ -1,13 +1,13 @@
/**
******************************************************************************
*
* @file configtelemetrywidget.h
* @file configrevohwwidget.cpp
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
* @addtogroup GCSPlugins GCS Plugins
* @{
* @addtogroup ConfigPlugin Config Plugin
* @{
* @brief The Configuration Gadget used to update settings in the firmware
* @brief Revolution hardware configuration panel
*****************************************************************************/
/*
* This program is free software; you can redistribute it and/or modify
@ -24,7 +24,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config_pro_hw_widget.h"
#include "configrevohwwidget.h"
#include <QDebug>
#include <QStringList>
@ -34,19 +34,19 @@
#include <QtGui/QPushButton>
ConfigProHWWidget::ConfigProHWWidget(QWidget *parent) : ConfigTaskWidget(parent)
ConfigRevoHWWidget::ConfigRevoHWWidget(QWidget *parent) : ConfigTaskWidget(parent)
{
m_telemetry = new Ui_PRO_HW_Widget();
m_telemetry->setupUi(this);
m_ui = new Ui_RevoHWWidget();
m_ui->setupUi(this);
addApplySaveButtons(m_telemetry->saveTelemetryToRAM,m_telemetry->saveTelemetryToSD);
addUAVObjectToWidgetRelation("HwSettings","TelemetrySpeed",m_telemetry->telemetrySpeed);
addApplySaveButtons(m_ui->saveTelemetryToRAM, m_ui->saveTelemetryToSD);
addUAVObjectToWidgetRelation("HwSettings", "TelemetrySpeed", m_ui->telemetrySpeed);
enableControls(false);
populateWidgets();
refreshWidgetsValues(NULL);
}
ConfigProHWWidget::~ConfigProHWWidget()
ConfigRevoHWWidget::~ConfigRevoHWWidget()
{
// Do nothing
}
@ -55,6 +55,6 @@ ConfigProHWWidget::~ConfigProHWWidget()
/**
Request telemetry settings from the board
*/
void ConfigProHWWidget::refreshValues()
void ConfigRevoHWWidget::refreshValues()
{
}

View File

@ -1,13 +1,13 @@
/**
******************************************************************************
*
* @file configtelemetrytwidget.h
* @file configrevohwwidget.h
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
* @addtogroup GCSPlugins GCS Plugins
* @{
* @addtogroup ConfigPlugin Config Plugin
* @{
* @brief Telemetry configuration panel
* @brief Revolution hardware configuration panel
*****************************************************************************/
/*
* This program is free software; you can redistribute it and/or modify
@ -24,10 +24,10 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef CONFIGPROHWWIDGET_H
#define CONFIGPROHWWIDGET_H
#ifndef CONFIGREVOHWWIDGET_H
#define CONFIGREVOHWWIDGET_H
#include "ui_pro_hw_settings.h"
#include "ui_configrevohwwidget.h"
#include "../uavobjectwidgetutils/configtaskwidget.h"
#include "extensionsystem/pluginmanager.h"
#include "uavobjectmanager.h"
@ -36,20 +36,20 @@
#include <QList>
class ConfigProHWWidget: public ConfigTaskWidget
class ConfigRevoHWWidget: public ConfigTaskWidget
{
Q_OBJECT
public:
ConfigProHWWidget(QWidget *parent = 0);
~ConfigProHWWidget();
ConfigRevoHWWidget(QWidget *parent = 0);
~ConfigRevoHWWidget();
private:
Ui_PRO_HW_Widget *m_telemetry;
Ui_RevoHWWidget *m_ui;
private slots:
virtual void refreshValues();
};
#endif // CONFIGPROHWWIDGET_H
#endif // CONFIGREVOHWWIDGET_H

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>PRO_HW_Widget</class>
<widget class="QWidget" name="PRO_HW_Widget">
<class>RevoHWWidget</class>
<widget class="QWidget" name="RevoHWWidget">
<property name="geometry">
<rect>
<x>0</x>
@ -29,7 +29,7 @@
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:7.8pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Sans'; font-size:10pt;&quot;&gt;Set the serial speed of your onboard telemetry modem here. It is the speed between the OpenPilot board and the onboard modem, and could be different from the radio link speed.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans'; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Sans'; font-size:10pt;&quot;&gt;Beware of not locking yourself out! You should only modify this setting when the OpenPilot board is connected through the USB port.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>