Commit c9a863b7 authored by lm's avatar lm

Minor bugfixes and compile fixes

parent a7688a04
...@@ -85,6 +85,11 @@ void UASManager::addUAS(UASInterface* uas) ...@@ -85,6 +85,11 @@ void UASManager::addUAS(UASInterface* uas)
} }
} }
QList<UASInterface*> UASManager::getUASList()
{
return systems.values();
}
UASInterface* UASManager::getActiveUAS() UASInterface* UASManager::getActiveUAS()
{ {
if(!activeUAS) if(!activeUAS)
......
...@@ -69,6 +69,8 @@ public: ...@@ -69,6 +69,8 @@ public:
**/ **/
UASInterface* getUASForId(int id); UASInterface* getUASForId(int id);
QList<UASInterface*> getUASList();
public slots: public slots:
......
...@@ -504,10 +504,6 @@ void MainWindow::connectPxWidgets() ...@@ -504,10 +504,6 @@ void MainWindow::connectPxWidgets()
{ {
if (linechartWidget) 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)), connect(linechartWidget, SIGNAL(logfileWritten(QString)),
this, SLOT(loadDataView(QString))); this, SLOT(loadDataView(QString)));
} }
......
...@@ -51,6 +51,15 @@ ParameterInterface::ParameterInterface(QWidget *parent) : ...@@ -51,6 +51,15 @@ ParameterInterface::ParameterInterface(QWidget *parent) :
// Setup UI connections // Setup UI connections
connect(m_ui->vehicleComboBox, SIGNAL(activated(int)), this, SLOT(selectUAS(int))); connect(m_ui->vehicleComboBox, SIGNAL(activated(int)), this, SLOT(selectUAS(int)));
// Get current MAV list
QList<UASInterface*> systems = UASManager::instance()->getUASList();
// Add each of them
foreach (UASInterface* sys, systems)
{
addUAS(sys);
}
// Setup MAV connections // Setup MAV connections
connect(UASManager::instance(), SIGNAL(UASCreated(UASInterface*)), this, SLOT(addUAS(UASInterface*))); connect(UASManager::instance(), SIGNAL(UASCreated(UASInterface*)), this, SLOT(addUAS(UASInterface*)));
this->setVisible(false); this->setVisible(false);
......
...@@ -56,7 +56,7 @@ maxInterval(MAX_STORAGE_INTERVAL), ...@@ -56,7 +56,7 @@ maxInterval(MAX_STORAGE_INTERVAL),
timeScaleStep(DEFAULT_SCALE_INTERVAL), // 10 seconds timeScaleStep(DEFAULT_SCALE_INTERVAL), // 10 seconds
automaticScrollActive(false), automaticScrollActive(false),
m_active(true), m_active(true),
m_groundTime(false), m_groundTime(true),
d_data(NULL), d_data(NULL),
d_curve(NULL) d_curve(NULL)
{ {
......
#include "Linecharts.h" #include "Linecharts.h"
#include "UASManager.h"
Linecharts::Linecharts(QWidget *parent) : Linecharts::Linecharts(QWidget *parent) :
QStackedWidget(parent), QStackedWidget(parent),
...@@ -6,6 +7,18 @@ Linecharts::Linecharts(QWidget *parent) : ...@@ -6,6 +7,18 @@ Linecharts::Linecharts(QWidget *parent) :
active(true) active(true)
{ {
this->setVisible(false); this->setVisible(false);
// Get current MAV list
QList<UASInterface*> 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)));
} }
......
...@@ -30,6 +30,7 @@ This file is part of the QGROUNDCONTROL project ...@@ -30,6 +30,7 @@ This file is part of the QGROUNDCONTROL project
*/ */
#include "GCManipulator.h" #include "GCManipulator.h"
#include <osg/Version>
GCManipulator::GCManipulator() GCManipulator::GCManipulator()
{ {
...@@ -254,10 +255,10 @@ GCManipulator::calcMovement(void) ...@@ -254,10 +255,10 @@ GCManipulator::calcMovement(void)
if (buttonMask == GUIEventAdapter::LEFT_MOUSE_BUTTON) if (buttonMask == GUIEventAdapter::LEFT_MOUSE_BUTTON)
{ {
// rotate camera // rotate camera
#ifdef __WIN32__ #if ((OPENSCENEGRAPH_MAJOR_VERSION == 2) & (OPENSCENEGRAPH_MINOR_VERSION > 8)) | (OPENSCENEGRAPH_MAJOR_VERSION > 2)
osg::Vec3 axis;
#else
osg::Vec3d axis; osg::Vec3d axis;
#else
osg::Vec3 axis;
#endif #endif
float angle; float angle;
......
...@@ -39,7 +39,11 @@ QMap3D::QMap3D(QWidget * parent, const char * name, WindowFlags f) : ...@@ -39,7 +39,11 @@ QMap3D::QMap3D(QWidget * parent, const char * name, WindowFlags f) :
QWidget(parent,f) QWidget(parent,f)
{ {
setupUi(this); setupUi(this);
#if ((OPENSCENEGRAPH_MAJOR_VERSION == 2) & (OPENSCENEGRAPH_MINOR_VERSION > 8)) | (OPENSCENEGRAPH_MAJOR_VERSION > 2)
graphicsView->setCameraManipulator(new osgEarth::Util::EarthManipulator); graphicsView->setCameraManipulator(new osgEarth::Util::EarthManipulator);
#else
graphicsView->setCameraManipulator(new osgEarthUtil::EarthManipulator);
#endif
graphicsView->setSceneData(new osg::Group); graphicsView->setSceneData(new osg::Group);
graphicsView->updateCamera(); graphicsView->updateCamera();
show(); show();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment