diff --git a/src/uas/UASManager.cc b/src/uas/UASManager.cc index 2af5a5fca38f5e5ac501bfe9a1c077eff0b38827..fabfec6ba1072d55fbf5101a2a710114d2631710 100644 --- a/src/uas/UASManager.cc +++ b/src/uas/UASManager.cc @@ -85,6 +85,11 @@ void UASManager::addUAS(UASInterface* uas) } } +QList UASManager::getUASList() +{ + return systems.values(); +} + UASInterface* UASManager::getActiveUAS() { if(!activeUAS) diff --git a/src/uas/UASManager.h b/src/uas/UASManager.h index c5ca03cc54e34a9850f5367170baaf71756a9d7e..b4d97789df578036d4b7a56d914a673ced3a159a 100644 --- a/src/uas/UASManager.h +++ b/src/uas/UASManager.h @@ -69,6 +69,8 @@ public: **/ UASInterface* getUASForId(int id); + QList getUASList(); + public slots: diff --git a/src/ui/MainWindow.cc b/src/ui/MainWindow.cc index 54011b14f5b2cff36d85e2f54819b5f00adb8ae3..b6827ac291d8c2dd4b45bf6b893b796c2d47a255 100644 --- a/src/ui/MainWindow.cc +++ b/src/ui/MainWindow.cc @@ -504,10 +504,6 @@ void MainWindow::connectPxWidgets() { if (linechartWidget) { - connect(UASManager::instance(), SIGNAL(UASCreated(UASInterface*)), - linechartWidget, SLOT(addSystem(UASInterface*))); - connect(UASManager::instance(), SIGNAL(activeUASSet(int)), - linechartWidget, SLOT(selectSystem(int))); connect(linechartWidget, SIGNAL(logfileWritten(QString)), this, SLOT(loadDataView(QString))); } diff --git a/src/ui/ParameterInterface.cc b/src/ui/ParameterInterface.cc index f44e08389301787445e07e46c16ab4da9a2b8d34..d6a3a59aae206baa6f968cf0ec0641b2e79462f3 100644 --- a/src/ui/ParameterInterface.cc +++ b/src/ui/ParameterInterface.cc @@ -51,6 +51,15 @@ ParameterInterface::ParameterInterface(QWidget *parent) : // Setup UI connections connect(m_ui->vehicleComboBox, SIGNAL(activated(int)), this, SLOT(selectUAS(int))); + // Get current MAV list + QList systems = UASManager::instance()->getUASList(); + + // Add each of them + foreach (UASInterface* sys, systems) + { + addUAS(sys); + } + // Setup MAV connections connect(UASManager::instance(), SIGNAL(UASCreated(UASInterface*)), this, SLOT(addUAS(UASInterface*))); this->setVisible(false); diff --git a/src/ui/linechart/LinechartPlot.cc b/src/ui/linechart/LinechartPlot.cc index 7d1613845034a908f3978e9db2db6af1a78cd213..3a7cb0183279d73dc87ff51d98e2f9bea52e1f3c 100644 --- a/src/ui/linechart/LinechartPlot.cc +++ b/src/ui/linechart/LinechartPlot.cc @@ -56,7 +56,7 @@ maxInterval(MAX_STORAGE_INTERVAL), timeScaleStep(DEFAULT_SCALE_INTERVAL), // 10 seconds automaticScrollActive(false), m_active(true), -m_groundTime(false), +m_groundTime(true), d_data(NULL), d_curve(NULL) { diff --git a/src/ui/linechart/Linecharts.cc b/src/ui/linechart/Linecharts.cc index 2cfaf83ad5fd35daa9bba71d17a5000e86ee8675..b47ea71a7f5a32b0d2281b57f2a0a166d8378ee5 100644 --- a/src/ui/linechart/Linecharts.cc +++ b/src/ui/linechart/Linecharts.cc @@ -1,4 +1,5 @@ #include "Linecharts.h" +#include "UASManager.h" Linecharts::Linecharts(QWidget *parent) : QStackedWidget(parent), @@ -6,6 +7,18 @@ Linecharts::Linecharts(QWidget *parent) : active(true) { this->setVisible(false); + // Get current MAV list + QList systems = UASManager::instance()->getUASList(); + + // Add each of them + foreach (UASInterface* sys, systems) + { + addSystem(sys); + } + connect(UASManager::instance(), SIGNAL(UASCreated(UASInterface*)), + this, SLOT(addSystem(UASInterface*))); + connect(UASManager::instance(), SIGNAL(activeUASSet(int)), + this, SLOT(selectSystem(int))); } diff --git a/src/ui/map3D/GCManipulator.cc b/src/ui/map3D/GCManipulator.cc index 05c9b246c9328055016a96095541e1251b17892c..06a7527b4233a16cf945d7c95c173bf607adfd1b 100644 --- a/src/ui/map3D/GCManipulator.cc +++ b/src/ui/map3D/GCManipulator.cc @@ -30,6 +30,7 @@ This file is part of the QGROUNDCONTROL project */ #include "GCManipulator.h" +#include GCManipulator::GCManipulator() { @@ -254,10 +255,10 @@ GCManipulator::calcMovement(void) if (buttonMask == GUIEventAdapter::LEFT_MOUSE_BUTTON) { // rotate camera -#ifdef __WIN32__ - osg::Vec3 axis; -#else +#if ((OPENSCENEGRAPH_MAJOR_VERSION == 2) & (OPENSCENEGRAPH_MINOR_VERSION > 8)) | (OPENSCENEGRAPH_MAJOR_VERSION > 2) osg::Vec3d axis; +#else + osg::Vec3 axis; #endif float angle; diff --git a/src/ui/map3D/QMap3D.cc b/src/ui/map3D/QMap3D.cc index 83ff90179ab0be7bfda1b1eb7c49616a897892e3..0a6e11f289417840d6b7d41ffce1b9237a55bb8a 100644 --- a/src/ui/map3D/QMap3D.cc +++ b/src/ui/map3D/QMap3D.cc @@ -39,7 +39,11 @@ QMap3D::QMap3D(QWidget * parent, const char * name, WindowFlags f) : QWidget(parent,f) { setupUi(this); +#if ((OPENSCENEGRAPH_MAJOR_VERSION == 2) & (OPENSCENEGRAPH_MINOR_VERSION > 8)) | (OPENSCENEGRAPH_MAJOR_VERSION > 2) graphicsView->setCameraManipulator(new osgEarth::Util::EarthManipulator); +#else + graphicsView->setCameraManipulator(new osgEarthUtil::EarthManipulator); +#endif graphicsView->setSceneData(new osg::Group); graphicsView->updateCamera(); show();