From 4b2d8078d5a054328df60ac2a46e95f985e08c64 Mon Sep 17 00:00:00 2001 From: pip Date: Fri, 21 Jan 2011 12:38:06 +0000 Subject: [PATCH] Fixing a slight cock up. git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2503 ebee16cc-31ac-478f-84a7-5cbb03baadba --- .../src/plugins/uploader/pipxtreme.pluginspec | 13 - ground/src/plugins/uploader/pipxtreme.pro | 39 - ground/src/plugins/uploader/pipxtreme.qrc | 5 - ground/src/plugins/uploader/pipxtreme.ui | 722 ------------------ .../src/plugins/uploader/pipxtremegadget.cpp | 49 -- ground/src/plugins/uploader/pipxtremegadget.h | 55 -- .../uploader/pipxtremegadgetconfiguration.cpp | 105 --- .../uploader/pipxtremegadgetconfiguration.h | 72 -- .../uploader/pipxtremegadgetfactory.cpp | 57 -- .../plugins/uploader/pipxtremegadgetfactory.h | 50 -- .../uploader/pipxtremegadgetoptionspage.cpp | 69 -- .../uploader/pipxtremegadgetoptionspage.h | 74 -- .../uploader/pipxtremegadgetwidget.cpp | 290 ------- .../plugins/uploader/pipxtremegadgetwidget.h | 86 --- .../src/plugins/uploader/pipxtremeplugin.cpp | 61 -- ground/src/plugins/uploader/pipxtremeplugin.h | 45 -- 16 files changed, 1792 deletions(-) delete mode 100644 ground/src/plugins/uploader/pipxtreme.pluginspec delete mode 100644 ground/src/plugins/uploader/pipxtreme.pro delete mode 100644 ground/src/plugins/uploader/pipxtreme.qrc delete mode 100644 ground/src/plugins/uploader/pipxtreme.ui delete mode 100644 ground/src/plugins/uploader/pipxtremegadget.cpp delete mode 100644 ground/src/plugins/uploader/pipxtremegadget.h delete mode 100644 ground/src/plugins/uploader/pipxtremegadgetconfiguration.cpp delete mode 100644 ground/src/plugins/uploader/pipxtremegadgetconfiguration.h delete mode 100644 ground/src/plugins/uploader/pipxtremegadgetfactory.cpp delete mode 100644 ground/src/plugins/uploader/pipxtremegadgetfactory.h delete mode 100644 ground/src/plugins/uploader/pipxtremegadgetoptionspage.cpp delete mode 100644 ground/src/plugins/uploader/pipxtremegadgetoptionspage.h delete mode 100644 ground/src/plugins/uploader/pipxtremegadgetwidget.cpp delete mode 100644 ground/src/plugins/uploader/pipxtremegadgetwidget.h delete mode 100644 ground/src/plugins/uploader/pipxtremeplugin.cpp delete mode 100644 ground/src/plugins/uploader/pipxtremeplugin.h diff --git a/ground/src/plugins/uploader/pipxtreme.pluginspec b/ground/src/plugins/uploader/pipxtreme.pluginspec deleted file mode 100644 index f67f414af..000000000 --- a/ground/src/plugins/uploader/pipxtreme.pluginspec +++ /dev/null @@ -1,13 +0,0 @@ - - The OpenPilot Project - (C) 2011 Cathy Moss A.K.A. Pip - The GNU Public License (GPL) Version 3 - A plugin to configure the PipXtreme OP modem via USB HID or Serial Port - http://www.openpilot.org - - - - - - - diff --git a/ground/src/plugins/uploader/pipxtreme.pro b/ground/src/plugins/uploader/pipxtreme.pro deleted file mode 100644 index 83abb8225..000000000 --- a/ground/src/plugins/uploader/pipxtreme.pro +++ /dev/null @@ -1,39 +0,0 @@ -TEMPLATE = lib -TARGET = PipXtreme -QT += svg -include(../../openpilotgcsplugin.pri) -include(../../plugins/coreplugin/coreplugin.pri) -include(../../plugins/uavobjects/uavobjects.pri) -include(../../plugins/uavtalk/uavtalk.pri) -include(../../plugins/rawhid/rawhid.pri) -INCLUDEPATH += ../../libs/qextserialport/src - -HEADERS += pipxtremegadget.h \ - pipxtremegadgetconfiguration.h \ - pipxtremegadgetfactory.h \ - pipxtremegadgetoptionspage.h \ - pipxtremegadgetwidget.h \ - plugin.h \ - delay.h \ - devicewidget.h \ - SSP/port.h \ - SSP/qssp.h \ - SSP/qsspt.h \ - SSP/common.h -SOURCES += pipxtremegadget.cpp \ - pipxtremegadgetconfiguration.cpp \ - pipxtremegadgetfactory.cpp \ - pipxtremegadgetoptionspage.cpp \ - pipxtremegadgetwidget.cpp \ - pipxtremeplugin.cpp \ - delay.cpp \ - SSP/port.cpp \ - SSP/qssp.cpp \ - SSP/qsspt.cpp -OTHER_FILES += PipXtreme.pluginspec - -FORMS += \ - pipxtreme.ui - -RESOURCES += \ - pipxtreme.qrc diff --git a/ground/src/plugins/uploader/pipxtreme.qrc b/ground/src/plugins/uploader/pipxtreme.qrc deleted file mode 100644 index d397a930b..000000000 --- a/ground/src/plugins/uploader/pipxtreme.qrc +++ /dev/null @@ -1,5 +0,0 @@ - - - images/view-refresh.svg - - diff --git a/ground/src/plugins/uploader/pipxtreme.ui b/ground/src/plugins/uploader/pipxtreme.ui deleted file mode 100644 index 6ee1331b4..000000000 --- a/ground/src/plugins/uploader/pipxtreme.ui +++ /dev/null @@ -1,722 +0,0 @@ - - - PipXtremeWidget - - - - 0 - 0 - 570 - 381 - - - - Form - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - true - - - true - - - Tells the mainboard to go down -to bootloader mode. -(Only enabled if telemetry link is established, either -through serial or USB) - - - Connect - - - - - - - - 200 - 0 - - - - When telemetry is not connected, select the communication -method using this combo box. - -You can use this to force a communication channel when doing -a "Boot" (button on the left). It is updated automatically when -halting a running board. - - - - - - - Refresh the list of serial ports - - - ... - - - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 8 - - - - - - - - - - Serial Number - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - - 75 - false - true - - - - false - - - QLineEdit { - border: none; - border-radius: 1px; - padding: 0 8px; - background: rgba(0, 0, 0, 16); -/* background: transparent; */ -/* selection-background-color: darkgray;*/ -} - - - true - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - true - - - - - - - Paired Serial Number - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - - - - Qt::AlignCenter - - - - - - - Frequency Band - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - - 75 - true - - - - QLineEdit { - border: none; - border-radius: 1px; - padding: 0 8px; - background: rgba(0, 0, 0, 16); -/* background: transparent; */ -/* selection-background-color: darkgray;*/ -} - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - true - - - - - - - Min Frequency (MHz) - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - - 75 - true - - - - QLineEdit { - border: none; - border-radius: 1px; - padding: 0 8px; - background: rgba(0, 0, 0, 16); -/* background: transparent; */ -/* selection-background-color: darkgray;*/ -} - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - true - - - - - - - Max Frequency (MHz) - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - - 75 - true - - - - QLineEdit { - border: none; - border-radius: 1px; - padding: 0 8px; - background: rgba(0, 0, 0, 16); -/* background: transparent; */ -/* selection-background-color: darkgray;*/ -} - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - true - - - - - - - Frequency Step Size (Hz) - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - - 75 - true - - - - QLineEdit { - border: none; - border-radius: 1px; - padding: 0 8px; - background: rgba(0, 0, 0, 16); -/* background: transparent; */ -/* selection-background-color: darkgray;*/ -} - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - true - - - - - - - State - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - - 75 - true - - - - QLineEdit { - border: none; - border-radius: 1px; - padding: 0 8px; - background: rgba(0, 0, 0, 16); -/* background: transparent; */ -/* selection-background-color: darkgray;*/ -} - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - true - - - - - - - - 16777215 - 16777215 - - - - - - - - - 16777215 - 16777215 - - - - Qt::LeftToRight - - - 0 - - - - - - - - 16777215 - 16777215 - - - - - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - Qt::AlignCenter - - - true - - - 8 - - - 0.000000000000000 - - - 1000.000000000000000 - - - 0.000001000000000 - - - - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - true - - - 255 - - - - - - - Serial Port Speed - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Max RF Tx Power - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Max RF Datarate (bits/s) - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Frequency (MHz) - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Frequency Calibration - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Mode - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 16777215 - 16777215 - - - - - - - - - - - - AES Encryption Key - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - The AES encryption key - - - - - - true - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - Radomise the AES encryption key - - - Rand - - - - - - - Qt::RightToLeft - - - Enable - - - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 8 - - - - - - - - - - Scan whole band - - - Scan Spectrum - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 0 - 0 - - - - - true - - - - - - - - - - diff --git a/ground/src/plugins/uploader/pipxtremegadget.cpp b/ground/src/plugins/uploader/pipxtremegadget.cpp deleted file mode 100644 index 3f1330408..000000000 --- a/ground/src/plugins/uploader/pipxtremegadget.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/** - ****************************************************************************** - * - * @file pipxtremegadget.cpp - * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. - * @addtogroup GCSPlugins GCS Plugins - * @{ - * @{ - *****************************************************************************/ -/* - * 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 "pipxtremegadget.h" -#include "pipxtremegadgetwidget.h" -#include "pipxtremegadgetconfiguration.h" - -PipXtremeGadget::PipXtremeGadget(QString classId, PipXtremeGadgetWidget *widget, QWidget *parent) : - IUAVGadget(classId, parent), - m_widget(widget) -{ -} - -PipXtremeGadget::~PipXtremeGadget() -{ - -} -/** - * Loads a configuration. - * - */ -void PipXtremeGadget::loadConfiguration(IUAVGadgetConfiguration* config) -{ - Q_UNUSED(config); -/* PipXtremeGadgetConfiguration *m = qobject_cast< PipXtremeGadgetConfiguration*>(config); - */ -} - diff --git a/ground/src/plugins/uploader/pipxtremegadget.h b/ground/src/plugins/uploader/pipxtremegadget.h deleted file mode 100644 index 547cb81a4..000000000 --- a/ground/src/plugins/uploader/pipxtremegadget.h +++ /dev/null @@ -1,55 +0,0 @@ -/** - ****************************************************************************** - * - * @file pipxtremegadget.h - * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. - * @addtogroup GCSPlugins GCS Plugins - * @{ - * @{ - * @brief The YModem protocol serial uploader plugin - *****************************************************************************/ -/* - * 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 PIPXTREMEGADGET_H -#define PIPXTREMEGADGET_H - -#include -#include "pipxtremegadgetwidget.h" - -class IUAVGadget; -class QWidget; -class QString; -class PipXtremeGadgetWidget; - -using namespace Core; - -class PipXtremeGadget : public Core::IUAVGadget -{ - Q_OBJECT -public: - PipXtremeGadget(QString classId, PipXtremeGadgetWidget *widget, QWidget *parent = 0); - ~PipXtremeGadget(); - - QWidget *widget() { return m_widget; } - void loadConfiguration(IUAVGadgetConfiguration* config); - -private: - PipXtremeGadgetWidget *m_widget; -}; - -#endif - diff --git a/ground/src/plugins/uploader/pipxtremegadgetconfiguration.cpp b/ground/src/plugins/uploader/pipxtremegadgetconfiguration.cpp deleted file mode 100644 index 502e0fc71..000000000 --- a/ground/src/plugins/uploader/pipxtremegadgetconfiguration.cpp +++ /dev/null @@ -1,105 +0,0 @@ -/** - ****************************************************************************** - * - * @file pipxtremegadgetconfiguration.cpp - * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. - * @addtogroup GCSPlugins GCS Plugins - * @{ - * @{ - *****************************************************************************/ -/* - * 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 "pipxtremegadgetconfiguration.h" -#include - -/** - * Loads a saved configuration or defaults if non exist. - * - */ -PipXtremeGadgetConfiguration::PipXtremeGadgetConfiguration(QString classId, QSettings* qSettings, QObject *parent) : - IUAVGadgetConfiguration(classId, parent), - m_defaultPort("Unknown"), - m_defaultSpeed(BAUD57600), - m_defaultDataBits(DATA_8), - m_defaultFlow(FLOW_OFF), - m_defaultParity(PAR_NONE), - m_defaultStopBits(STOP_1), - m_defaultTimeOut(5000) - -{ - //if a saved configuration exists load it - if (qSettings != 0) - { - BaudRateType speed; - DataBitsType databits; - FlowType flow; - ParityType parity; - StopBitsType stopbits; - - int ispeed = qSettings->value("defaultSpeed").toInt(); - int idatabits = qSettings->value("defaultDataBits").toInt(); - int iflow = qSettings->value("defaultFlow").toInt(); - int iparity = qSettings->value("defaultParity").toInt(); - int istopbits = qSettings->value("defaultStopBits").toInt(); - QString port = qSettings->value("defaultPort").toString(); - - databits=(DataBitsType) idatabits; - flow=(FlowType)iflow; - parity=(ParityType)iparity; - stopbits=(StopBitsType)istopbits; - speed=(BaudRateType)ispeed; - - m_defaultPort=port; - m_defaultSpeed=speed; - m_defaultDataBits=databits; - m_defaultFlow=flow; - m_defaultParity=parity; - m_defaultStopBits=stopbits; - } -} - -/** - * Clones a configuration. - * - */ -IUAVGadgetConfiguration *PipXtremeGadgetConfiguration::clone() -{ - PipXtremeGadgetConfiguration *m = new PipXtremeGadgetConfiguration(this->classId()); - - m->m_defaultSpeed = m_defaultSpeed; - m->m_defaultDataBits = m_defaultDataBits; - m->m_defaultFlow = m_defaultFlow; - m->m_defaultParity = m_defaultParity; - m->m_defaultStopBits = m_defaultStopBits; - m->m_defaultPort = m_defaultPort; - - return m; -} - -/** - * Saves a configuration. - * - */ -void PipXtremeGadgetConfiguration::saveConfig(QSettings* qSettings) const -{ - qSettings->setValue("defaultSpeed", m_defaultSpeed); - qSettings->setValue("defaultDataBits", m_defaultDataBits); - qSettings->setValue("defaultFlow", m_defaultFlow); - qSettings->setValue("defaultParity", m_defaultParity); - qSettings->setValue("defaultStopBits", m_defaultStopBits); - qSettings->setValue("defaultPort", m_defaultPort); -} diff --git a/ground/src/plugins/uploader/pipxtremegadgetconfiguration.h b/ground/src/plugins/uploader/pipxtremegadgetconfiguration.h deleted file mode 100644 index 034eba45d..000000000 --- a/ground/src/plugins/uploader/pipxtremegadgetconfiguration.h +++ /dev/null @@ -1,72 +0,0 @@ -/** - ****************************************************************************** - * - * @file pipxtremegadgetconfiguration.h - * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. - * @addtogroup GCSPlugins GCS Plugins - * @{ - * @{ - * @brief The YModem protocol serial uploader plugin - *****************************************************************************/ -/* - * 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 PIPXTREMEGADGETCONFIGURATION_H -#define PIPXTREMEGADGETCONFIGURATION_H - -#include -#include - -using namespace Core; - -class PipXtremeGadgetConfiguration : public IUAVGadgetConfiguration -{ -Q_OBJECT -public: - explicit PipXtremeGadgetConfiguration(QString classId, QSettings* qSettings = 0, QObject *parent = 0); - - //set port configuration functions - void setSpeed(BaudRateType speed) {m_defaultSpeed=speed;} - void setDataBits(DataBitsType databits) {m_defaultDataBits=databits;} - void setFlow(FlowType flow) {m_defaultFlow=flow;} - void setParity(ParityType parity) {m_defaultParity=parity;} - void setStopBits(StopBitsType stopbits) {m_defaultStopBits=stopbits;} - void setPort(QString port){m_defaultPort=port;} - void setTimeOut(long timeout){m_defaultTimeOut=timeout;} - - //get port configuration functions - BaudRateType Speed() {return m_defaultSpeed;} - DataBitsType DataBits() {return m_defaultDataBits;} - FlowType Flow() {return m_defaultFlow;} - ParityType Parity() {return m_defaultParity;} - StopBitsType StopBits() {return m_defaultStopBits;} - QString Port(){return m_defaultPort;} - long TimeOut(){return m_defaultTimeOut;} - - void saveConfig(QSettings* settings) const; - IUAVGadgetConfiguration *clone(); - -private: - QString m_defaultPort; - BaudRateType m_defaultSpeed; - DataBitsType m_defaultDataBits; - FlowType m_defaultFlow; - ParityType m_defaultParity; - StopBitsType m_defaultStopBits; - long m_defaultTimeOut; -}; - -#endif diff --git a/ground/src/plugins/uploader/pipxtremegadgetfactory.cpp b/ground/src/plugins/uploader/pipxtremegadgetfactory.cpp deleted file mode 100644 index 2a5fe3a33..000000000 --- a/ground/src/plugins/uploader/pipxtremegadgetfactory.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/** - ****************************************************************************** - * - * @file pipxtremegadgetfactory.cpp - * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. - * @addtogroup GCSPlugins GCS Plugins - * @{ - * @{ - *****************************************************************************/ -/* - * 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 "pipxtremegadgetfactory.h" -#include "pipxtremegadgetwidget.h" -#include "pipxtremegadget.h" -#include "pipxtremegadgetconfiguration.h" -#include "pipxtremegadgetoptionspage.h" -#include - -PipXtremeGadgetFactory::PipXtremeGadgetFactory(QObject *parent) : - IUAVGadgetFactory(QString("PipXtreme"), tr("PipXtreme Gadget"), parent) -{ -} - -PipXtremeGadgetFactory::~PipXtremeGadgetFactory() -{ -} - -Core::IUAVGadget* PipXtremeGadgetFactory::createGadget(QWidget *parent) -{ - PipXtremeGadgetWidget* gadgetWidget = new PipXtremeGadgetWidget(parent); - return new PipXtremeGadget(QString("PipXtreme"), gadgetWidget, parent); -} - -IUAVGadgetConfiguration *PipXtremeGadgetFactory::createConfiguration(QSettings* qSettings) -{ - return new PipXtremeGadgetConfiguration(QString("PipXtreme"), qSettings); -} - -IOptionsPage *PipXtremeGadgetFactory::createOptionsPage(IUAVGadgetConfiguration *config) -{ - return new PipXtremeGadgetOptionsPage(qobject_cast(config)); -} - diff --git a/ground/src/plugins/uploader/pipxtremegadgetfactory.h b/ground/src/plugins/uploader/pipxtremegadgetfactory.h deleted file mode 100644 index 58100e9d1..000000000 --- a/ground/src/plugins/uploader/pipxtremegadgetfactory.h +++ /dev/null @@ -1,50 +0,0 @@ -/** - ****************************************************************************** - * - * @file pipxtremegadgetfactory.h - * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. - * @addtogroup GCSPlugins GCS Plugins - * @{ - * @{ - *****************************************************************************/ -/* - * 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 PIPXTREMEGADGETFACTORY_H -#define PIPXTREMEGADGETFACTORY_H - -#include - -namespace Core { -class IUAVGadget; -class IUAVGadgetFactory; -} - -using namespace Core; - -class PipXtremeGadgetFactory : public Core::IUAVGadgetFactory -{ - Q_OBJECT -public: - PipXtremeGadgetFactory(QObject *parent = 0); - ~PipXtremeGadgetFactory(); - - Core::IUAVGadget *createGadget(QWidget *parent); - IUAVGadgetConfiguration *createConfiguration(QSettings* qSettings); - IOptionsPage *createOptionsPage(IUAVGadgetConfiguration *config); -}; - -#endif diff --git a/ground/src/plugins/uploader/pipxtremegadgetoptionspage.cpp b/ground/src/plugins/uploader/pipxtremegadgetoptionspage.cpp deleted file mode 100644 index 59eb68e0f..000000000 --- a/ground/src/plugins/uploader/pipxtremegadgetoptionspage.cpp +++ /dev/null @@ -1,69 +0,0 @@ -/** - ****************************************************************************** - * - * @file pipxtremegadgetoptionspage.cpp - * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. - * @addtogroup GCSPlugins GCS Plugins - * @{ - * @{ - *****************************************************************************/ -/* - * 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 "pipxtremegadgetoptionspage.h" -#include "pipxtremegadgetconfiguration.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -PipXtremeGadgetOptionsPage::PipXtremeGadgetOptionsPage(PipXtremeGadgetConfiguration *config, QObject *parent) : - IOptionsPage(parent), - m_config(config) -{ -} - -//creates options page widget -QWidget *PipXtremeGadgetOptionsPage::createPage(QWidget *parent) -{ - //main widget - QWidget *widget = new QWidget; - - return widget; -} -/** - * Called when the user presses apply or OK. - * - * Saves the current values - * - */ -void PipXtremeGadgetOptionsPage::apply() -{ - -} - -void PipXtremeGadgetOptionsPage::finish() -{ - -} - - diff --git a/ground/src/plugins/uploader/pipxtremegadgetoptionspage.h b/ground/src/plugins/uploader/pipxtremegadgetoptionspage.h deleted file mode 100644 index 8189728a2..000000000 --- a/ground/src/plugins/uploader/pipxtremegadgetoptionspage.h +++ /dev/null @@ -1,74 +0,0 @@ -/** - ****************************************************************************** - * - * @file pipxtremegadgetoptionspage.h - * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. - * @addtogroup GCSPlugins GCS Plugins - * @{ - * @{ - *****************************************************************************/ -/* - * 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 PIPXTREMEGADGETOPTIONSPAGE_H -#define PIPXTREMEGADGETOPTIONSPAGE_H -#include -#include "coreplugin/dialogs/ioptionspage.h" -#include "QString" -#include -#include - -namespace Core { -class IUAVGadgetConfiguration; -} -class PipXtremeGadgetConfiguration; -class QTextEdit; -class QComboBox; -class QSpinBox; - -using namespace Core; - -class PipXtremeGadgetOptionsPage : public IOptionsPage -{ -Q_OBJECT -public: - explicit PipXtremeGadgetOptionsPage(PipXtremeGadgetConfiguration *config, QObject *parent = 0); - - QWidget *createPage(QWidget *parent); - void apply(); - void finish(); - -private: - PipXtremeGadgetConfiguration *m_config; - QComboBox *m_portCB; - QComboBox *m_speedCB; - QComboBox *m_databitsCB; - QComboBox *m_flowCB; - QComboBox *m_parityCB; - QComboBox *m_stopbitsCB; - QSpinBox *m_timeoutSpin; - QStringList BaudRateTypeString; - QStringList BaudRateTypeStringALL; - QStringList DataBitsTypeStringALL; - QStringList ParityTypeStringALL; - QStringList StopBitsTypeStringALL; - QStringList DataBitsTypeString; - QStringList ParityTypeString; - QStringList StopBitsTypeString; - QStringList FlowTypeString; -}; - -#endif diff --git a/ground/src/plugins/uploader/pipxtremegadgetwidget.cpp b/ground/src/plugins/uploader/pipxtremegadgetwidget.cpp deleted file mode 100644 index 520d6f1ee..000000000 --- a/ground/src/plugins/uploader/pipxtremegadgetwidget.cpp +++ /dev/null @@ -1,290 +0,0 @@ -/** - ****************************************************************************** - * - * @file pipxtremegadgetwidget.cpp - * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. - * @addtogroup GCSPlugins GCS Plugins - * @{ - * @{ - *****************************************************************************/ -/* - * 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 "pipxtremegadgetwidget.h" - -// constructor -PipXtremeGadgetWidget::PipXtremeGadgetWidget(QWidget *parent) : QWidget(parent) -{ - m_config = new Ui_PipXtremeWidget(); - m_config->setupUi(this); - - currentStep = IAP_STATE_READY; - rescueStep = RESCUE_STEP0; - resetOnly = false; - - m_config->comboBox_Mode->clear(); - m_config->comboBox_Mode->addItem("Normal", 0); - m_config->comboBox_Mode->addItem("Scan Spectrum", 1); - m_config->comboBox_Mode->addItem("Tx Carrier Calibrate", 2); - m_config->comboBox_Mode->addItem("Tx Spectrum Test", 3); - - m_config->comboBox_SerialPortSpeed->clear(); - m_config->comboBox_SerialPortSpeed->addItem("1200", 1200); - m_config->comboBox_SerialPortSpeed->addItem("2400", 2400); - m_config->comboBox_SerialPortSpeed->addItem("4800", 4800); - m_config->comboBox_SerialPortSpeed->addItem("9600", 9600); - m_config->comboBox_SerialPortSpeed->addItem("19200", 19200); - m_config->comboBox_SerialPortSpeed->addItem("38400", 38400); - m_config->comboBox_SerialPortSpeed->addItem("57600", 57600); - m_config->comboBox_SerialPortSpeed->addItem("115200", 115200); - m_config->comboBox_SerialPortSpeed->addItem("230400", 230400); - m_config->comboBox_SerialPortSpeed->addItem("460800", 460800); - m_config->comboBox_SerialPortSpeed->addItem("921600", 921600); - - m_config->doubleSpinBox_Frequency->setSingleStep(0.00015625); - - m_config->graphicsView_Spectrum->setScene(new QGraphicsScene(this)); - QGraphicsScene *spec_scene = m_config->graphicsView_Spectrum->scene(); - if (spec_scene) - { - spec_scene->setBackgroundBrush(Qt::black); - spec_scene->clear(); -// spec_scene->addItem(m_background); -// spec_scene->addItem(m_joystickEnd); -// spec_scene->setSceneRect(m_background->boundingRect()); - } - - m_config->pushButton_ScanSpectrum->setEnabled(false); - - // Listen to autopilot connection events - ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance(); - TelemetryManager *telMngr = pm->getObject(); - connect(telMngr, SIGNAL(connected()), this, SLOT(onModemConnect())); - connect(telMngr, SIGNAL(disconnected()), this, SLOT(onModemDisconnect())); - - // Note: remove listening to the connection manager, it overlaps with - // listening to the telemetry manager, we should only listen to one, not both. - - // Also listen to disconnect actions from the user: - // Core::ConnectionManager *cm = Core::ICore::instance()->connectionManager(); - // connect(cm, SIGNAL(deviceDisconnected()), this, SLOT(onModemDisconnect())); - - connect(m_config->connectButton, SIGNAL(clicked()), this, SLOT(goToAPIMode())); - - getSerialPorts(); - - QIcon rbi; - rbi.addFile(QString(":pipxtreme/images/view-refresh.svg")); - m_config->refreshPorts->setIcon(rbi); - - connect(m_config->refreshPorts, SIGNAL(clicked()), this, SLOT(getSerialPorts())); - -// delay::msleep(600); // just for pips reference -} - -// destructor -PipXtremeGadgetWidget::~PipXtremeGadgetWidget() -{ -} - -void PipXtremeGadgetWidget::resizeEvent(QResizeEvent *event) -{ - if (m_config) - { - if (m_config->graphicsView_Spectrum) - { - QGraphicsScene *spec_scene = m_config->graphicsView_Spectrum->scene(); - if (spec_scene) - { -// spec_scene->setSceneRect(QRect(QPoint(0, 0), event->size())); -// spec_scene->setBackgroundBrush(Qt::black); - } - } - } - -// PipXtremeGadgetWidget::resizeEvent(event); -} - -bool sortPorts(const QextPortInfo &s1,const QextPortInfo &s2) -{ - return (s1.portName < s2.portName); -} - -// Gets the list of serial ports -void PipXtremeGadgetWidget::getSerialPorts() -{ - QStringList list; - - m_config->refreshPorts->setEnabled(false); - m_config->telemetryLink->setEnabled(false); - - // Populate the telemetry combo box: - m_config->telemetryLink->clear(); - -// list.append(QString("USB")); - - QList ports = QextSerialEnumerator::getPorts(); - - // sort the list by port number (nice idea from PT_Dreamer :)) - qSort(ports.begin(), ports.end(),sortPorts); - foreach (QextPortInfo port, ports) - { - list.append(port.friendName); - } - - m_config->telemetryLink->addItems(list); - - m_config->refreshPorts->setEnabled(true); - m_config->telemetryLink->setEnabled(true); -} - -QString PipXtremeGadgetWidget::getPortDevice(const QString &friendName) -{ - QList ports = QextSerialEnumerator::getPorts(); - - foreach (QextPortInfo port, ports) - { - #ifdef Q_OS_WIN - if (port.friendName == friendName) - return port.portName; - #else - if (port.friendName == friendName) - return port.physName; - #endif - } - - return ""; -} - -void PipXtremeGadgetWidget::onModemConnect() -{ - m_config->connectButton->setText(tr(" Disconnect ")); - m_config->telemetryLink->setEnabled(false); - m_config->pushButton_ScanSpectrum->setEnabled(true); -} - -void PipXtremeGadgetWidget::onModemDisconnect() -{ - m_config->connectButton->setText(tr(" Connect ")); - m_config->telemetryLink->setEnabled(true); - m_config->pushButton_ScanSpectrum->setEnabled(false); -} - -// Ask the modem to go into API mode -void PipXtremeGadgetWidget::goToAPIMode(UAVObject* callerObj, bool success) -{ - Q_UNUSED(callerObj); -/* - ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance(); - UAVObjectManager *objManager = pm->getObject(); - UAVObject *fwIAP = dynamic_cast(objManager->getObject(QString("FirmwareIAPObj"))); - - switch (currentStep) - { - case IAP_STATE_READY: - getSerialPorts(); // Useful in case a new serial port appeared since the initial list, - // otherwise we won't find it when we stop the board. - - // The board is running, send the 1st IAP Reset order: - fwIAP->getField("Command")->setValue("1122"); - connect(fwIAP,SIGNAL(transactionCompleted(UAVObject*,bool)),this,SLOT(goToAPIMode(UAVObject*, bool))); - currentStep = IAP_STATE_STEP_1; - fwIAP->updated(); - - break; - - case IAP_STATE_STEP_1: - if (!success) - { - currentStep = IAP_STATE_READY; - disconnect(fwIAP, SIGNAL(transactionCompleted(UAVObject*,bool)),this,SLOT(goToAPIMode(UAVObject*, bool))); - break; - } - - delay::msleep(600); - - fwIAP->getField("Command")->setValue("2233"); - currentStep = IAP_STATE_READY; - fwIAP->updated(); - - break; - } -*/ -} - -// Tell the modem to reset -void PipXtremeGadgetWidget::systemReset() -{ - resetOnly = true; -/* - if (dfu) - { - delete dfu; - dfu = NULL; - } -*/ - goToAPIMode(); -} - -// Tells the system to boot (from Bootloader state) -void PipXtremeGadgetWidget::systemBoot() -{ -/* - // Suspend telemety & polling in case it is not done yet - Core::ConnectionManager *cm = Core::ICore::instance()->connectionManager(); - cm->disconnectDevice(); - cm->suspendPolling(); - - QString devName = m_config->telemetryLink->currentText(); - repaint(); - - if (!dfu) - { - if (devName == "USB") - dfu = new DFUObject(DFU_DEBUG, false, QString()); - else - dfu = new DFUObject(DFU_DEBUG,true,getPortDevice(devName)); - } - dfu->AbortOperation(); - if (!dfu->enterDFU(0)) - { - delete dfu; - dfu = NULL; - - return; - } - dfu->JumpToApp(); - // Restart the polling thread - cm->resumePolling(); - - m_config->telemetryLink->setEnabled(true); - if (currentStep == IAP_STATE_BOOTLOADER ) - { - } - currentStep = IAP_STATE_READY; - delete dfu; // Frees up the USB/Serial port too - dfu = NULL; -*/ -} - -// Shows a message box with an error string. -void PipXtremeGadgetWidget::error(QString errorString, int errorNumber) -{ - Q_UNUSED(errorNumber); - QMessageBox msgBox; - msgBox.setIcon(QMessageBox::Critical); - msgBox.setText(errorString + " [" + QString::number(errorNumber) + "]"); - msgBox.exec(); -} diff --git a/ground/src/plugins/uploader/pipxtremegadgetwidget.h b/ground/src/plugins/uploader/pipxtremegadgetwidget.h deleted file mode 100644 index 306c03e56..000000000 --- a/ground/src/plugins/uploader/pipxtremegadgetwidget.h +++ /dev/null @@ -1,86 +0,0 @@ -/** - ****************************************************************************** - * - * @file pipxtremegadgetwidget.h - * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. - * @addtogroup GCSPlugins GCS Plugins - * @{ - * @{ - *****************************************************************************/ -/* - * 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 PIPXTREMEGADGETWIDGET_H -#define PIPXTREMEGADGETWIDGET_H - -#include "ui_pipxtreme.h" -#include "delay.h" -//#include "op_dfu.h" - -#include -#include - -#include "uavtalk/telemetrymanager.h" -#include "extensionsystem/pluginmanager.h" -#include "uavobjects/uavobjectmanager.h" -#include "uavobjects/uavobject.h" -#include "rawhid/rawhidplugin.h" - -#include -#include -#include -#include -#include -#include - -//using namespace OP_DFU; - -class PipXtremeGadgetWidget : public QWidget -{ - Q_OBJECT - -public: - PipXtremeGadgetWidget(QWidget *parent = 0); - ~PipXtremeGadgetWidget(); - - typedef enum { IAP_STATE_READY, IAP_STATE_STEP_1} IAPStep; - typedef enum { RESCUE_STEP0, RESCUE_STEP1, RESCUE_STEP2, RESCUE_STEP3, RESCUE_POWER1, RESCUE_POWER2, RESCUE_DETECT } RescueStep; - -public slots: - void onModemConnect(); - void onModemDisconnect(); - -protected: - void resizeEvent(QResizeEvent *event); - -private: - Ui_PipXtremeWidget *m_config; -// DFUObject *dfu; - IAPStep currentStep; - RescueStep rescueStep; - bool resetOnly; - - QString getPortDevice(const QString &friendName); - -private slots: - void error(QString errorString,int errorNumber); - void goToAPIMode(UAVObject* = NULL, bool = false); - void systemReset(); - void systemBoot(); - void getSerialPorts(); -}; - -#endif diff --git a/ground/src/plugins/uploader/pipxtremeplugin.cpp b/ground/src/plugins/uploader/pipxtremeplugin.cpp deleted file mode 100644 index 1826efc7d..000000000 --- a/ground/src/plugins/uploader/pipxtremeplugin.cpp +++ /dev/null @@ -1,61 +0,0 @@ - -/** - ****************************************************************************** - * - * @file pipxtremeplugin.cpp - * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. - * @addtogroup GCSPlugins GCS Plugins - * @{ - * @{ - *****************************************************************************/ -/* - * 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 "pipxtremeplugin.h" -#include "pipxtremegadgetfactory.h" -#include -#include -#include - -PipXtremePlugin::PipXtremePlugin() -{ - // Do nothing -} - -PipXtremePlugin::~PipXtremePlugin() -{ - // Do nothing -} - -bool PipXtremePlugin::initialize(const QStringList& args, QString *errMsg) -{ - Q_UNUSED(args); - Q_UNUSED(errMsg); - mf = new PipXtremeGadgetFactory(this); - addAutoReleasedObject(mf); - return true; -} - -void PipXtremePlugin::extensionsInitialized() -{ - // Do nothing -} - -void PipXtremePlugin::shutdown() -{ - // Do nothing -} -Q_EXPORT_PLUGIN(PipXtremePlugin) - diff --git a/ground/src/plugins/uploader/pipxtremeplugin.h b/ground/src/plugins/uploader/pipxtremeplugin.h deleted file mode 100644 index b3e783287..000000000 --- a/ground/src/plugins/uploader/pipxtremeplugin.h +++ /dev/null @@ -1,45 +0,0 @@ -/** - ****************************************************************************** - * - * @file pipxtremeplugin.h - * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. - * @addtogroup GCSPlugins GCS Plugins - * @{ - * @{ - *****************************************************************************/ -/* - * 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 PIPXTREMEPLUGIN_H -#define PIPXTREMEPLUGIN_H - -#include - -class PipXtremeGadgetFactory; - -class PipXtremePlugin : public ExtensionSystem::IPlugin -{ -public: - PipXtremePlugin(); - ~PipXtremePlugin(); - - void extensionsInitialized(); - bool initialize(const QStringList & arguments, QString * errorString); - void shutdown(); -private: - PipXtremeGadgetFactory *mf; -}; -#endif