1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-29 14:52:12 +01:00

OP-1122 OP-1125 cleaned up GCS side uavtalk includes

This commit is contained in:
Philippe Renon 2013-12-11 22:22:28 +01:00
parent 617924e64d
commit e0115a25b0
24 changed files with 66 additions and 63 deletions

View File

@ -33,7 +33,6 @@
#include "extensionsystem/pluginmanager.h" #include "extensionsystem/pluginmanager.h"
#include "uavobjectmanager.h" #include "uavobjectmanager.h"
#include "uavobject.h" #include "uavobject.h"
#include "uavtalk/telemetrymanager.h"
#include <QWidget> #include <QWidget>
#include <QList> #include <QList>

View File

@ -33,7 +33,7 @@
#include "extensionsystem/pluginmanager.h" #include "extensionsystem/pluginmanager.h"
#include "uavobjectmanager.h" #include "uavobjectmanager.h"
#include "uavobject.h" #include "uavobject.h"
#include "uavtalk/telemetrymanager.h"
#include <QWidget> #include <QWidget>
#include <QList> #include <QList>
#include <QItemDelegate> #include <QItemDelegate>

View File

@ -33,7 +33,7 @@
#include "extensionsystem/pluginmanager.h" #include "extensionsystem/pluginmanager.h"
#include "uavobjectmanager.h" #include "uavobjectmanager.h"
#include "uavobject.h" #include "uavobject.h"
#include "uavtalk/telemetrymanager.h"
#include <QWidget> #include <QWidget>
#include <QList> #include <QList>
#include <QItemDelegate> #include <QItemDelegate>

View File

@ -33,7 +33,6 @@
#include "extensionsystem/pluginmanager.h" #include "extensionsystem/pluginmanager.h"
#include "uavobjectmanager.h" #include "uavobjectmanager.h"
#include "uavobject.h" #include "uavobject.h"
#include "uavtalk/telemetrymanager.h"
#include <QtCore/QList> #include <QtCore/QList>
#include <QWidget> #include <QWidget>

View File

@ -42,6 +42,8 @@
#include "defaulthwsettingswidget.h" #include "defaulthwsettingswidget.h"
#include "uavobjectutilmanager.h" #include "uavobjectutilmanager.h"
#include <uavtalk/telemetrymanager.h>
#include <QDebug> #include <QDebug>
#include <QStringList> #include <QStringList>
#include <QWidget> #include <QWidget>

View File

@ -27,18 +27,18 @@
#ifndef CONFIGGADGETWIDGET_H #ifndef CONFIGGADGETWIDGET_H
#define CONFIGGADGETWIDGET_H #define CONFIGGADGETWIDGET_H
#include "uavtalk/telemetrymanager.h"
#include "extensionsystem/pluginmanager.h" #include "extensionsystem/pluginmanager.h"
#include "uavobjectmanager.h" #include "uavobjectmanager.h"
#include "uavobject.h" #include "uavobject.h"
#include "objectpersistence.h" #include "objectpersistence.h"
#include "utils/pathutils.h"
#include "utils/mytabbedstackwidget.h"
#include "../uavobjectwidgetutils/configtaskwidget.h"
#include <QWidget> #include <QWidget>
#include <QList> #include <QList>
#include <QTextBrowser> #include <QTextBrowser>
#include "utils/pathutils.h"
#include <QMessageBox> #include <QMessageBox>
#include "utils/mytabbedstackwidget.h"
#include "../uavobjectwidgetutils/configtaskwidget.h"
class ConfigGadgetWidget : public QWidget { class ConfigGadgetWidget : public QWidget {
Q_OBJECT Q_OBJECT

View File

@ -27,7 +27,8 @@
#include "configinputwidget.h" #include "configinputwidget.h"
#include "uavtalk/telemetrymanager.h" #include <extensionsystem/pluginmanager.h>
#include <coreplugin/generalsettings.h>
#include <QDebug> #include <QDebug>
#include <QStringList> #include <QStringList>
@ -41,9 +42,6 @@
#include <utils/stylehelper.h> #include <utils/stylehelper.h>
#include <QMessageBox> #include <QMessageBox>
#include <extensionsystem/pluginmanager.h>
#include <coreplugin/generalsettings.h>
#define ACCESS_MIN_MOVE -3 #define ACCESS_MIN_MOVE -3
#define ACCESS_MAX_MOVE 3 #define ACCESS_MAX_MOVE 3
#define STICK_MIN_MOVE -8 #define STICK_MIN_MOVE -8

View File

@ -29,7 +29,14 @@
#include "outputchannelform.h" #include "outputchannelform.h"
#include "configvehicletypewidget.h" #include "configvehicletypewidget.h"
#include "uavtalk/telemetrymanager.h" #include "mixersettings.h"
#include "actuatorcommand.h"
#include "actuatorsettings.h"
#include "systemalarms.h"
#include "systemsettings.h"
#include "uavsettingsimportexport/uavsettingsimportexportfactory.h"
#include <extensionsystem/pluginmanager.h>
#include <coreplugin/generalsettings.h>
#include <QDebug> #include <QDebug>
#include <QStringList> #include <QStringList>
@ -40,14 +47,6 @@
#include <QMessageBox> #include <QMessageBox>
#include <QDesktopServices> #include <QDesktopServices>
#include <QUrl> #include <QUrl>
#include "mixersettings.h"
#include "actuatorcommand.h"
#include "actuatorsettings.h"
#include "systemalarms.h"
#include "systemsettings.h"
#include "uavsettingsimportexport/uavsettingsimportexportfactory.h"
#include <extensionsystem/pluginmanager.h>
#include <coreplugin/generalsettings.h>
ConfigOutputWidget::ConfigOutputWidget(QWidget *parent) : ConfigTaskWidget(parent), wasItMe(false) ConfigOutputWidget::ConfigOutputWidget(QWidget *parent) : ConfigTaskWidget(parent), wasItMe(false)
{ {

View File

@ -31,7 +31,6 @@
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <coreplugin/coreconstants.h> #include <coreplugin/coreconstants.h>
#include <coreplugin/actionmanager/actionmanager.h> #include <coreplugin/actionmanager/actionmanager.h>
#include "uavtalk/telemetrymanager.h"
#include "objectpersistence.h" #include "objectpersistence.h"
#include <QMessageBox> #include <QMessageBox>

View File

@ -1,12 +1,6 @@
#ifndef ISIMULATOR_H #ifndef ISIMULATOR_H
#define ISIMULATOR_H #define ISIMULATOR_H
#include <QObject>
#include <QUdpSocket>
#include <QTimer>
#include <math.h>
#include "uavtalk/telemetrymanager.h"
#include "uavobjectmanager.h" #include "uavobjectmanager.h"
#include "actuatordesired.h" #include "actuatordesired.h"
#include "altitudestate.h" #include "altitudestate.h"
@ -15,6 +9,11 @@
#include "positionstate.h" #include "positionstate.h"
#include "gcstelemetrystats.h" #include "gcstelemetrystats.h"
#include <QObject>
#include <QUdpSocket>
#include <QTimer>
#include <math.h>
class Simulator : public QObject { class Simulator : public QObject {
Q_OBJECT Q_OBJECT
public: public:

View File

@ -27,11 +27,13 @@
#include "simulator.h" #include "simulator.h"
#include "extensionsystem/pluginmanager.h"
#include "coreplugin/icore.h"
#include "coreplugin/threadmanager.h"
#include "hitlnoisegeneration.h" #include "hitlnoisegeneration.h"
#include <extensionsystem/pluginmanager.h>
#include <coreplugin/icore.h>
#include <coreplugin/threadmanager.h>
#include <uavtalk/telemetrymanager.h>
volatile bool Simulator::isStarted = false; volatile bool Simulator::isStarted = false;
const float Simulator::GEE = 9.81; const float Simulator::GEE = 9.81;

View File

@ -28,14 +28,7 @@
#ifndef ISIMULATOR_H #ifndef ISIMULATOR_H
#define ISIMULATOR_H #define ISIMULATOR_H
#include <QObject>
#include <QUdpSocket>
#include <QTimer>
#include <QProcess>
#include <qmath.h>
#include "qscopedpointer.h" #include "qscopedpointer.h"
#include "uavtalk/telemetrymanager.h"
#include "uavobjectmanager.h" #include "uavobjectmanager.h"
#include "accelstate.h" #include "accelstate.h"
@ -61,6 +54,13 @@
#include "utils/coordinateconversions.h" #include "utils/coordinateconversions.h"
#include <QObject>
#include <QUdpSocket>
#include <QTime>
#include <QTimer>
#include <QProcess>
#include <qmath.h>
/** /**
* just imagine this was a class without methods and all public properties * just imagine this was a class without methods and all public properties
*/ */

View File

@ -29,15 +29,17 @@
#include "notificationitem.h" #include "notificationitem.h"
#include "notifypluginoptionspage.h" #include "notifypluginoptionspage.h"
#include "notifylogging.h" #include "notifylogging.h"
#include <extensionsystem/pluginmanager.h>
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <uavtalk/telemetrymanager.h>
#include <iostream>
#include <QDebug> #include <QDebug>
#include <QtPlugin> #include <QtPlugin>
#include <QStringList> #include <QStringList>
#include <extensionsystem/pluginmanager.h>
#include <iostream>
static const QString VERSION = "1.0.0"; static const QString VERSION = "1.0.0";
// #define DEBUG_NOTIFIES // #define DEBUG_NOTIFIES
@ -125,7 +127,7 @@ void SoundNotifyPlugin::readConfig(QSettings *settings, UAVConfigInfo * /* confi
void SoundNotifyPlugin::onTelemetryManagerAdded(QObject *obj) void SoundNotifyPlugin::onTelemetryManagerAdded(QObject *obj)
{ {
telMngr = qobject_cast<TelemetryManager *>(obj); TelemetryManager *telMngr = qobject_cast<TelemetryManager *>(obj);
if (telMngr) { if (telMngr) {
connect(telMngr, SIGNAL(disconnected()), this, SLOT(onAutopilotDisconnect())); connect(telMngr, SIGNAL(disconnected()), this, SLOT(onAutopilotDisconnect()));
} }

View File

@ -29,7 +29,6 @@
#include <extensionsystem/iplugin.h> #include <extensionsystem/iplugin.h>
#include <coreplugin/iconfigurableplugin.h> #include <coreplugin/iconfigurableplugin.h>
#include "uavtalk/telemetrymanager.h"
#include "uavobjectmanager.h" #include "uavobjectmanager.h"
#include "uavobject.h" #include "uavobject.h"
#include "notificationitem.h" #include "notificationitem.h"
@ -111,7 +110,6 @@ private:
PhononObject phonon; PhononObject phonon;
NotifyPluginOptionsPage *mop; NotifyPluginOptionsPage *mop;
TelemetryManager *telMngr;
QMediaPlaylist *playlist; QMediaPlaylist *playlist;
}; };

View File

@ -30,7 +30,6 @@
#include "scopegadgetwidget.h" #include "scopegadgetwidget.h"
#include "utils/stylehelper.h" #include "utils/stylehelper.h"
#include "uavtalk/telemetrymanager.h"
#include "extensionsystem/pluginmanager.h" #include "extensionsystem/pluginmanager.h"
#include "uavobjectmanager.h" #include "uavobjectmanager.h"
#include "uavobject.h" #include "uavobject.h"

View File

@ -31,7 +31,6 @@
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <coreplugin/connectionmanager.h> #include <coreplugin/connectionmanager.h>
#include "setupwizard.h" #include "setupwizard.h"
#include "uavtalk/telemetrymanager.h"
#include "abstractwizardpage.h" #include "abstractwizardpage.h"
#include "uploader/enums.h" #include "uploader/enums.h"

View File

@ -25,11 +25,13 @@
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#include "systemalarms.h"
#include "systemhealthgadgetwidget.h" #include "systemhealthgadgetwidget.h"
#include "utils/stylehelper.h" #include "utils/stylehelper.h"
#include "extensionsystem/pluginmanager.h" #include "extensionsystem/pluginmanager.h"
#include "uavobjectmanager.h" #include "uavobjectmanager.h"
#include "systemalarms.h" #include <uavtalk/telemetrymanager.h>
#include <QDebug> #include <QDebug>
#include <QWhatsThis> #include <QWhatsThis>

View File

@ -30,7 +30,7 @@
#include "systemhealthgadgetconfiguration.h" #include "systemhealthgadgetconfiguration.h"
#include "uavobject.h" #include "uavobject.h"
#include "uavtalk/telemetrymanager.h"
#include <QGraphicsView> #include <QGraphicsView>
#include <QtSvg/QSvgRenderer> #include <QtSvg/QSvgRenderer>
#include <QtSvg/QGraphicsSvgItem> #include <QtSvg/QGraphicsSvgItem>

View File

@ -25,14 +25,15 @@
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#include "monitorgadgetfactory.h" #include "monitorgadgetfactory.h"
#include "uavtalk/telemetrymanager.h"
#include "extensionsystem/pluginmanager.h"
#include "monitorgadgetconfiguration.h" #include "monitorgadgetconfiguration.h"
#include "monitorgadget.h" #include "monitorgadget.h"
#include "monitorgadgetoptionspage.h" #include "monitorgadgetoptionspage.h"
#include <extensionsystem/pluginmanager.h>
#include <coreplugin/connectionmanager.h> #include <coreplugin/connectionmanager.h>
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <uavtalk/telemetrymanager.h>
MonitorGadgetFactory::MonitorGadgetFactory(QObject *parent) : MonitorGadgetFactory::MonitorGadgetFactory(QObject *parent) :
IUAVGadgetFactory(QString("TelemetryMonitorGadget"), tr("Telemetry Monitor"), parent) IUAVGadgetFactory(QString("TelemetryMonitorGadget"), tr("Telemetry Monitor"), parent)

View File

@ -25,9 +25,12 @@
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#include "configtaskwidget.h" #include "configtaskwidget.h"
#include <uavtalk/telemetrymanager.h>
#include "uavsettingsimportexport/uavsettingsimportexportfactory.h"
#include <QWidget> #include <QWidget>
#include <QLineEdit> #include <QLineEdit>
#include "uavsettingsimportexport/uavsettingsimportexportfactory.h"
/** /**
* Constructor * Constructor
@ -324,7 +327,8 @@ void ConfigTaskWidget::forceConnectedState() // dynamic widgets don't recieve th
void ConfigTaskWidget::onAutopilotConnect() void ConfigTaskWidget::onAutopilotConnect()
{ {
if (utilMngr) { if (utilMngr) {
currentBoard = utilMngr->getBoardModel(); // TODO REMEMBER TO ADD THIS TO FORCE CONNECTED FUNC ON CC3D_RELEASE // TODO REMEMBER TO ADD THIS TO FORCE CONNECTED FUNC ON CC3D_RELEASE
currentBoard = utilMngr->getBoardModel();
} }
invalidateObjects(); invalidateObjects();
isConnected = true; isConnected = true;
@ -1226,8 +1230,8 @@ void ConfigTaskWidget::loadWidgetLimits(QWidget *widget, UAVObjectField *field,
void ConfigTaskWidget::updateEnableControls() void ConfigTaskWidget::updateEnableControls()
{ {
TelemetryManager *telMngr = pm->getObject<TelemetryManager>(); TelemetryManager *telMngr = pm->getObject<TelemetryManager>();
Q_ASSERT(telMngr); Q_ASSERT(telMngr);
enableControls(telMngr->isConnected()); enableControls(telMngr->isConnected());
} }

View File

@ -27,7 +27,6 @@
#ifndef SMARTSAVEBUTTON_H #ifndef SMARTSAVEBUTTON_H
#define SMARTSAVEBUTTON_H #define SMARTSAVEBUTTON_H
#include "uavtalk/telemetrymanager.h"
#include "extensionsystem/pluginmanager.h" #include "extensionsystem/pluginmanager.h"
#include "uavobjectmanager.h" #include "uavobjectmanager.h"
#include "uavobject.h" #include "uavobject.h"

View File

@ -30,17 +30,17 @@
#include "ui_runningdevicewidget.h" #include "ui_runningdevicewidget.h"
#include <QWidget>
#include <QErrorMessage>
#include <QtSvg/QGraphicsSvgItem>
#include <QtSvg/QSvgRenderer>
#include "uavtalk/telemetrymanager.h"
#include "extensionsystem/pluginmanager.h" #include "extensionsystem/pluginmanager.h"
#include "uavobjectmanager.h" #include "uavobjectmanager.h"
#include "uavobject.h" #include "uavobject.h"
#include "uavobjectutilmanager.h" #include "uavobjectutilmanager.h"
#include "uploader_global.h" #include "uploader_global.h"
#include <QWidget>
#include <QErrorMessage>
#include <QtSvg/QGraphicsSvgItem>
#include <QtSvg/QSvgRenderer>
class UPLOADER_EXPORT RunningDeviceWidget : public QWidget { class UPLOADER_EXPORT RunningDeviceWidget : public QWidget {
Q_OBJECT Q_OBJECT
public: public:

View File

@ -26,10 +26,13 @@
*/ */
#include "uploadergadgetwidget.h" #include "uploadergadgetwidget.h"
#include "version_info/version_info.h" #include "version_info/version_info.h"
#include <coreplugin/coreconstants.h>
#include <QDebug>
#include "flightstatus.h" #include "flightstatus.h"
#include <coreplugin/coreconstants.h>
#include <uavtalk/telemetrymanager.h>
#include <QDebug>
#define DFU_DEBUG true #define DFU_DEBUG true
const int UploaderGadgetWidget::AUTOUPDATE_CLOSE_TIMEOUT = 7000; const int UploaderGadgetWidget::AUTOUPDATE_CLOSE_TIMEOUT = 7000;

View File

@ -36,7 +36,6 @@
#include <QtSerialPort/QSerialPort> #include <QtSerialPort/QSerialPort>
#include <QtSerialPort/QSerialPortInfo> #include <QtSerialPort/QSerialPortInfo>
#include "uavtalk/telemetrymanager.h"
#include "extensionsystem/pluginmanager.h" #include "extensionsystem/pluginmanager.h"
#include "uavobjectmanager.h" #include "uavobjectmanager.h"
#include "uavobject.h" #include "uavobject.h"