Commit 0309f130 authored by Bryant Mairs's avatar Bryant Mairs

Merge branch 'master' of https://github.com/mavlink/qgroundcontrol into del_slugs

parents 80e96ad7 e4977186
#
# [REQUIRED] Tell the Linux build to look in a few additional places for libs
#
LinuxBuild {
INCLUDEPATH += \
/usr/include \
/usr/local/include
LIBS += \
-L/usr/lib
linux-g++-64 {
LIBS += \
-L/usr/local/lib64 \
-L/usr/lib64
}
}
# #
# [REQUIRED] Add support for <inttypes.h> to Windows. # [REQUIRED] Add support for <inttypes.h> to Windows.
# #
...@@ -261,36 +243,6 @@ else:exists(user_config.pri):infile(user_config.pri, DEFINES, DISABLE_GOOGLE_EAR ...@@ -261,36 +243,6 @@ else:exists(user_config.pri):infile(user_config.pri, DEFINES, DISABLE_GOOGLE_EAR
message("Skipping support for Google Earth view (unsupported platform)") message("Skipping support for Google Earth view (unsupported platform)")
} }
#
# [OPTIONAL] Protcol Buffers for PixHawk
#
LinuxBuild : contains(MAVLINK_DIALECT, pixhawk) {
exists(/usr/local/include/google/protobuf) | exists(/usr/include/google/protobuf) {
message("Including support for Protocol Buffers")
DEFINES += QGC_PROTOBUF_ENABLED
LIBS += \
-lprotobuf \
-lprotobuf-lite \
-lprotoc
HEADERS += \
libs/mavlink/include/mavlink/v1.0/pixhawk/pixhawk.pb.h \
src/ui/map3D/ObstacleGroupNode.h \
src/ui/map3D/GLOverlayGeode.h
SOURCES += \
libs/mavlink/share/mavlink/src/v1.0/pixhawk/pixhawk.pb.cc \
src/ui/map3D/ObstacleGroupNode.cc \
src/ui/map3D/GLOverlayGeode.cc
} else {
warning("Skipping support for Protocol Buffers (missing libraries, see README)")
}
} else {
message("Skipping support for Protocol Buffers (unsupported platform)")
}
# #
# [REQUIRED] EIGEN matrix library # [REQUIRED] EIGEN matrix library
# NOMINMAX constant required to make internal min/max work. # NOMINMAX constant required to make internal min/max work.
...@@ -341,13 +293,15 @@ contains(DEFINES, DISABLE_XBEE) { ...@@ -341,13 +293,15 @@ contains(DEFINES, DISABLE_XBEE) {
} else:exists(user_config.pri):infile(user_config.pri, DEFINES, DISABLE_XBEE) { } else:exists(user_config.pri):infile(user_config.pri, DEFINES, DISABLE_XBEE) {
message("Skipping support for native XBee API (manual override from user_config.pri)") message("Skipping support for native XBee API (manual override from user_config.pri)")
} else:LinuxBuild { } else:LinuxBuild {
exists(/usr/include/xbee.h) { linux-g++-64 {
message("Skipping support for XBee API (64-bit Linux builds not supported)")
} else:exists(/usr/include/xbee.h) {
message("Including support for XBee API") message("Including support for XBee API")
HEADERS += $$XBEE_DEPENDENT_HEADERS HEADERS += $$XBEE_DEPENDENT_HEADERS
SOURCES += $$XBEE_DEPENDENT_SOURCES SOURCES += $$XBEE_DEPENDENT_SOURCES
DEFINES += $$XBEE_DEFINES DEFINES += $$XBEE_DEFINES
LIBS += -lxbee LIBS += -L/usr/lib -lxbee
} else { } else {
warning("Skipping support for XBee API (missing libraries, see README)") warning("Skipping support for XBee API (missing libraries, see README)")
} }
......
...@@ -159,11 +159,8 @@ WindowsBuild { ...@@ -159,11 +159,8 @@ WindowsBuild {
DESTDIR_WIN = $$replace(DESTDIR, "/", "\\") DESTDIR_WIN = $$replace(DESTDIR, "/", "\\")
D_DIR = $$[QT_INSTALL_LIBEXECS] D_DIR = $$[QT_INSTALL_LIBEXECS]
DLL_DIR = $$replace(D_DIR, "/", "\\") DLL_DIR = $$replace(D_DIR, "/", "\\")
P_DIR = $$[QT_INSTALL_PLUGINS]
PLUGIN_DIR = $$replace(P_DIR, "/", "\\")
# Copy dependencies # Copy dependencies
DebugBuild: DLL_QT_DEBUGCHAR = "d" DebugBuild: DLL_QT_DEBUGCHAR = "d"
ReleaseBuild: DLL_QT_DEBUGCHAR = "" ReleaseBuild: DLL_QT_DEBUGCHAR = ""
COPY_FILE_LIST = \ COPY_FILE_LIST = \
......
...@@ -334,6 +334,14 @@ QMenu::separator { ...@@ -334,6 +334,14 @@ QMenu::separator {
margin: 8px 5px 4px 5px; margin: 8px 5px 4px 5px;
} }
/*
* Fix for bug in Qt5 where QMenuBar items are styled natively on Windows, ignoring inherited settings.
* so we explicitly set their background color here (should match catch-all style background color).
*/
QMenuBar::item {
background-color: #222;
}
QMenuBar::item:selected { QMenuBar::item:selected {
background-color: #CCC; background-color: #CCC;
color: #000; color: #000;
......
...@@ -278,6 +278,14 @@ QMenu::separator { ...@@ -278,6 +278,14 @@ QMenu::separator {
margin: 8px 5px 4px 5px; margin: 8px 5px 4px 5px;
} }
/*
* Fix for bug in Qt5 where QMenuBar items are styled natively on Windows, ignoring inherited settings.
* so we explicitly set their background color here (should match catch-all style background color).
*/
QMenuBar::item {
background-color: #F6F6F6;
}
QMenuBar::item:selected { QMenuBar::item:selected {
background-color: #555; background-color: #555;
color: #FFF; color: #FFF;
......
Subproject commit 04b1ad5b284d5e916858ca9f928e93d97bbf6ad9 Subproject commit 77d9553174779947b45aa08d29129dcb659f5b5e
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** Commercial Usage
**
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
**
** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at http://qt.nokia.com/contact.
**
**************************************************************************/
#include "qtconcurrent/multitask.h"
#include "qtconcurrent/runextensions.h"
/**
******************************************************************************
*
* @file multitask.h
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
* Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009.
* @brief
* @see The GNU Public License (GPL) Version 3
* @defgroup
* @{
*
*****************************************************************************/
/*
* 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 MULTITASK_H
#define MULTITASK_H
#include "qtconcurrent_global.h"
#include "runextensions.h"
#include <QtCore/QObject>
#include <QtCore/QList>
#include <QtCore/QEventLoop>
#include <QtCore/QFutureWatcher>
#include <QtCore/QtConcurrentRun>
#include <QtCore/QThreadPool>
#include <QtDebug>
QT_BEGIN_NAMESPACE
namespace QtConcurrent {
class QTCONCURRENT_EXPORT MultiTaskBase : public QObject, public QRunnable
{
Q_OBJECT
protected slots:
virtual void cancelSelf() = 0;
virtual void setFinished() = 0;
virtual void setProgressRange(int min, int max) = 0;
virtual void setProgressValue(int value) = 0;
virtual void setProgressText(QString value) = 0;
};
template <typename Class, typename R>
class MultiTask : public MultiTaskBase
{
public:
MultiTask(void (Class::*fn)(QFutureInterface<R> &), const QList<Class *> &objects)
: fn(fn),
objects(objects)
{
maxProgress = 100*objects.size();
}
QFuture<R> future()
{
futureInterface.reportStarted();
return futureInterface.future();
}
void run()
{
QThreadPool::globalInstance()->releaseThread();
futureInterface.setProgressRange(0, maxProgress);
foreach (Class *object, objects) {
QFutureWatcher<R> *watcher = new QFutureWatcher<R>();
watchers.insert(object, watcher);
finished.insert(watcher, false);
connect(watcher, SIGNAL(finished()), this, SLOT(setFinished()));
connect(watcher, SIGNAL(progressRangeChanged(int,int)), this, SLOT(setProgressRange(int,int)));
connect(watcher, SIGNAL(progressValueChanged(int)), this, SLOT(setProgressValue(int)));
connect(watcher, SIGNAL(progressTextChanged(QString)), this, SLOT(setProgressText(QString)));
watcher->setFuture(QtConcurrent::run(fn, object));
}
selfWatcher = new QFutureWatcher<R>();
connect(selfWatcher, SIGNAL(canceled()), this, SLOT(cancelSelf()));
selfWatcher->setFuture(futureInterface.future());
loop = new QEventLoop;
loop->exec();
futureInterface.reportFinished();
QThreadPool::globalInstance()->reserveThread();
qDeleteAll(watchers.values());
delete selfWatcher;
delete loop;
}
protected:
void cancelSelf()
{
foreach (QFutureWatcher<R> *watcher, watchers)
watcher->future().cancel();
}
void setFinished()
{
updateProgress();
QFutureWatcher<R> *watcher = static_cast<QFutureWatcher<R> *>(sender());
if (finished.contains(watcher))
finished[watcher] = true;
bool allFinished = true;
const QList<bool> finishedValues = finished.values();
foreach (bool isFinished, finishedValues) {
if (!isFinished) {
allFinished = false;
break;
}
}
if (allFinished)
loop->quit();
}
void setProgressRange(int min, int max)
{
Q_UNUSED(min)
Q_UNUSED(max)
updateProgress();
}
void setProgressValue(int value)
{
Q_UNUSED(value)
updateProgress();
}
void setProgressText(QString value)
{
Q_UNUSED(value)
updateProgressText();
}
private:
void updateProgress()
{
int progressSum = 0;
const QList<QFutureWatcher<R> *> watchersValues = watchers.values();
foreach (QFutureWatcher<R> *watcher, watchersValues) {
if (watcher->progressMinimum() == watcher->progressMaximum()) {
if (watcher->future().isFinished() && !watcher->future().isCanceled())
progressSum += 100;
} else {
progressSum += 100*(watcher->progressValue()-watcher->progressMinimum())/(watcher->progressMaximum()-watcher->progressMinimum());
}
}
futureInterface.setProgressValue(progressSum);
}
void updateProgressText()
{
QString text;
const QList<QFutureWatcher<R> *> watchersValues = watchers.values();
foreach (QFutureWatcher<R> *watcher, watchersValues) {
if (!watcher->progressText().isEmpty())
text += watcher->progressText() + "\n";
}
text = text.trimmed();
futureInterface.setProgressValueAndText(futureInterface.progressValue(), text);
}
QFutureInterface<R> futureInterface;
void (Class::*fn)(QFutureInterface<R> &);
QList<Class *> objects;
QFutureWatcher<R> *selfWatcher;
QMap<Class *, QFutureWatcher<R> *> watchers;
QMap<QFutureWatcher<R> *, bool> finished;
QEventLoop *loop;
int maxProgress;
};
template <typename Class, typename T>
QFuture<T> run(void (Class::*fn)(QFutureInterface<T> &), const QList<Class *> &objects, int priority = 0)
{
MultiTask<Class, T> *task = new MultiTask<Class, T>(fn, objects);
QFuture<T> future = task->future();
QThreadPool::globalInstance()->start(task, priority);
return future;
}
} // namespace QtConcurrent
QT_END_NAMESPACE
#endif // MULTITASK_H
LIBS *= -l$$qtLibraryTarget(QtConcurrent)
TEMPLATE = lib
TARGET = QtConcurrent
DEFINES += BUILD_QTCONCURRENT
include(../../openpilotgcslibrary.pri)
HEADERS += \
qtconcurrent_global.h \
multitask.h \
runextensions.h
/**
******************************************************************************
*
* @file qtconcurrent_global.h
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
* Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009.
* @brief
* @see The GNU Public License (GPL) Version 3
* @defgroup
* @{
*
*****************************************************************************/
/*
* 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 QTCONCURRENT_GLOBAL_H
#define QTCONCURRENT_GLOBAL_H
#include <QtCore/qglobal.h>
#if defined(BUILD_QTCONCURRENT)
# define QTCONCURRENT_EXPORT Q_DECL_EXPORT
#else
# define QTCONCURRENT_EXPORT Q_DECL_IMPORT
#endif
#endif // QTCONCURRENT_GLOBAL_H
This diff is collapsed.
...@@ -756,8 +756,7 @@ HEADERS += \ ...@@ -756,8 +756,7 @@ HEADERS += \
src/qgcunittest/FlightModeConfigTest.h \ src/qgcunittest/FlightModeConfigTest.h \
src/qgcunittest/FlightGearTest.h \ src/qgcunittest/FlightGearTest.h \
src/qgcunittest/TCPLinkTest.h \ src/qgcunittest/TCPLinkTest.h \
src/qgcunittest/TCPLoopBackServer.h \ src/qgcunittest/TCPLoopBackServer.h
src/qgcunittest/QGCUASFileManagerTest.h
SOURCES += \ SOURCES += \
src/qgcunittest/UASUnitTest.cc \ src/qgcunittest/UASUnitTest.cc \
...@@ -769,5 +768,4 @@ SOURCES += \ ...@@ -769,5 +768,4 @@ SOURCES += \
src/qgcunittest/FlightModeConfigTest.cc \ src/qgcunittest/FlightModeConfigTest.cc \
src/qgcunittest/FlightGearTest.cc \ src/qgcunittest/FlightGearTest.cc \
src/qgcunittest/TCPLinkTest.cc \ src/qgcunittest/TCPLinkTest.cc \
src/qgcunittest/TCPLoopBackServer.cc \ src/qgcunittest/TCPLoopBackServer.cc
src/qgcunittest/QGCUASFileManagerTest.cc
import QtQuick 1.1 import QtQuick 2.1
import "./components" import "./components"
......
import QtQuick 1.1 import QtQuick 2.1
Rectangle { Rectangle {
signal clicked signal clicked
......
import QtQuick 1.1 import QtQuick 2.1
Rectangle { Rectangle {
......
import QtQuick 1.1 import QtQuick 2.1
Rectangle { Rectangle {
id: statusDisplay id: statusDisplay
......
import QtQuick 1.1 import QtQuick 2.1
Rectangle { Rectangle {
signal clicked signal clicked
......
Subproject commit 09109881e7a2dc1a0c381264d531e9b7930a7c80 Subproject commit 4a1cf20507252eafecb2e06618e73afceeb76608
...@@ -32,10 +32,6 @@ ...@@ -32,10 +32,6 @@
#include "QGCMAVLinkUASFactory.h" #include "QGCMAVLinkUASFactory.h"
#include "QGC.h" #include "QGC.h"
#ifdef QGC_PROTOBUF_ENABLED
#include <google/protobuf/descriptor.h>
#endif
Q_DECLARE_METATYPE(mavlink_message_t) Q_DECLARE_METATYPE(mavlink_message_t)
/** /**
...@@ -317,87 +313,6 @@ void MAVLinkProtocol::receiveBytes(LinkInterface* link, QByteArray b) ...@@ -317,87 +313,6 @@ void MAVLinkProtocol::receiveBytes(LinkInterface* link, QByteArray b)
rstatus.txbuf, rstatus.noise, rstatus.remnoise); rstatus.txbuf, rstatus.noise, rstatus.remnoise);
} }
#if defined(QGC_PROTOBUF_ENABLED)
if (message.msgid == MAVLINK_MSG_ID_EXTENDED_MESSAGE)
{
mavlink_extended_message_t extended_message;
extended_message.base_msg = message;
// read extended header
uint8_t* payload = reinterpret_cast<uint8_t*>(message.payload64);
memcpy(&extended_message.extended_payload_len, payload + 3, 4);
// Check if message is valid
if
(b.size() != MAVLINK_NUM_NON_PAYLOAD_BYTES+MAVLINK_EXTENDED_HEADER_LEN+ extended_message.extended_payload_len)
{
//invalid message
qDebug() << "GOT INVALID EXTENDED MESSAGE, ABORTING";
return;
}
const uint8_t* extended_payload = reinterpret_cast<const uint8_t*>(b.constData()) + MAVLINK_NUM_NON_PAYLOAD_BYTES + MAVLINK_EXTENDED_HEADER_LEN;
// copy extended payload data
memcpy(extended_message.extended_payload, extended_payload, extended_message.extended_payload_len);
#if defined(QGC_USE_PIXHAWK_MESSAGES)
if (protobufManager.cacheFragment(extended_message))
{
std::tr1::shared_ptr<google::protobuf::Message> protobuf_msg;
if (protobufManager.getMessage(protobuf_msg))
{
const google::protobuf::Descriptor* descriptor = protobuf_msg->GetDescriptor();
if (!descriptor)
{
continue;
}
const google::protobuf::FieldDescriptor* headerField = descriptor->FindFieldByName("header");
if (!headerField)
{
continue;
}
const google::protobuf::Descriptor* headerDescriptor = headerField->message_type();
if (!headerDescriptor)
{
continue;
}
const google::protobuf::FieldDescriptor* sourceSysIdField = headerDescriptor->FindFieldByName("source_sysid");
if (!sourceSysIdField)
{
continue;
}
const google::protobuf::Reflection* reflection = protobuf_msg->GetReflection();
const google::protobuf::Message& headerMsg = reflection->GetMessage(*protobuf_msg, headerField);
const google::protobuf::Reflection* headerReflection = headerMsg.GetReflection();
int source_sysid = headerReflection->GetInt32(headerMsg, sourceSysIdField);
UASInterface* uas = UASManager::instance()->getUASForId(source_sysid);
if (uas != NULL)
{
emit extendedMessageReceived(link, protobuf_msg);
}
}
}
#endif
position += extended_message.extended_payload_len;
continue;
}
#endif
// Log data // Log data
if (m_loggingEnabled && m_logfile) if (m_loggingEnabled && m_logfile)
{ {
......
...@@ -42,15 +42,6 @@ This file is part of the QGROUNDCONTROL project ...@@ -42,15 +42,6 @@ This file is part of the QGROUNDCONTROL project
#include "QGCMAVLink.h" #include "QGCMAVLink.h"
#include "QGC.h" #include "QGC.h"
#if defined(QGC_PROTOBUF_ENABLED)
#include <tr1/memory>
#include <google/protobuf/message.h>
#if defined(QGC_USE_PIXHAWK_MESSAGES)
#include <mavlink_protobuf_manager.hpp>
#endif
#endif
/** /**
* @brief MAVLink micro air vehicle protocol reference implementation. * @brief MAVLink micro air vehicle protocol reference implementation.
* *
...@@ -239,17 +230,9 @@ protected: ...@@ -239,17 +230,9 @@ protected:
int systemId; int systemId;
bool _should_exit; bool _should_exit;
#if defined(QGC_PROTOBUF_ENABLED) && defined(QGC_USE_PIXHAWK_MESSAGES)
mavlink::ProtobufManager protobufManager;
#endif
signals: signals:
/** @brief Message received and directly copied via signal */ /** @brief Message received and directly copied via signal */
void messageReceived(LinkInterface* link, mavlink_message_t message); void messageReceived(LinkInterface* link, mavlink_message_t message);
#if defined(QGC_PROTOBUF_ENABLED)
/** @brief Message received via signal */
void extendedMessageReceived(LinkInterface *link, std::tr1::shared_ptr<google::protobuf::Message> message);
#endif
/** @brief Emitted if heartbeat emission mode is changed */ /** @brief Emitted if heartbeat emission mode is changed */
void heartbeatChanged(bool heartbeats); void heartbeatChanged(bool heartbeats);
/** @brief Emitted if logging is started / stopped */ /** @brief Emitted if logging is started / stopped */
......
...@@ -55,7 +55,7 @@ This file is part of the QGROUNDCONTROL project ...@@ -55,7 +55,7 @@ This file is part of the QGROUNDCONTROL project
void msgHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg) void msgHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg)
{ {
const char symbols[] = { 'I', 'E', '!', 'X' }; const char symbols[] = { 'I', 'E', '!', 'X' };
QString output = QString("[%1] in %2:%3 - \"%2\"").arg(symbols[type]).arg(context.file).arg(context.line).arg(msg); QString output = QString("[%1] at %2:%3 - \"%4\"").arg(symbols[type]).arg(context.file).arg(context.line).arg(msg);
std::cerr << output.toStdString() << std::endl; std::cerr << output.toStdString() << std::endl;
if( type == QtFatalMsg ) abort(); if( type == QtFatalMsg ) abort();
} }
......
...@@ -97,18 +97,6 @@ public: ...@@ -97,18 +97,6 @@ public:
virtual double getPitch() const { Q_ASSERT(false); return std::numeric_limits<double>::quiet_NaN(); }; virtual double getPitch() const { Q_ASSERT(false); return std::numeric_limits<double>::quiet_NaN(); };
virtual double getYaw() const { Q_ASSERT(false); return std::numeric_limits<double>::quiet_NaN(); }; virtual double getYaw() const { Q_ASSERT(false); return std::numeric_limits<double>::quiet_NaN(); };
virtual bool getSelected() const { Q_ASSERT(false); return false; }; virtual bool getSelected() const { Q_ASSERT(false); return false; };
#if defined(QGC_PROTOBUF_ENABLED) && defined(QGC_USE_PIXHAWK_MESSAGES)
virtual px::GLOverlay getOverlay() { Q_ASSERT(false); };
virtual px::GLOverlay getOverlay(qreal& receivedTimestamp) { Q_ASSERT(false); };
virtual px::ObstacleList getObstacleList() { Q_ASSERT(false); };
virtual px::ObstacleList getObstacleList(qreal& receivedTimestamp) { Q_ASSERT(false); };
virtual px::Path getPath() { Q_ASSERT(false); };
virtual px::Path getPath(qreal& receivedTimestamp) { Q_ASSERT(false); };
virtual px::PointCloudXYZRGB getPointCloud() { Q_ASSERT(false); };
virtual px::PointCloudXYZRGB getPointCloud(qreal& receivedTimestamp) { Q_ASSERT(false); };
virtual px::RGBDImage getRGBDImage() { Q_ASSERT(false); };
virtual px::RGBDImage getRGBDImage(qreal& receivedTimestamp) { Q_ASSERT(false); };
#endif
virtual bool isArmed() const { Q_ASSERT(false); return false; }; virtual bool isArmed() const { Q_ASSERT(false); return false; };
virtual int getAirframe() const { Q_ASSERT(false); return 0; }; virtual int getAirframe() const { Q_ASSERT(false); return 0; };
virtual UASWaypointManager* getWaypointManager(void) { Q_ASSERT(false); return NULL; }; virtual UASWaypointManager* getWaypointManager(void) { Q_ASSERT(false); return NULL; };
......
...@@ -206,14 +206,6 @@ void PxQuadMAV::receiveMessage(LinkInterface* link, mavlink_message_t message) ...@@ -206,14 +206,6 @@ void PxQuadMAV::receiveMessage(LinkInterface* link, mavlink_message_t message)
#endif #endif
} }
#if defined(QGC_PROTOBUF_ENABLED)
void PxQuadMAV::receiveExtendedMessage(LinkInterface* link, std::tr1::shared_ptr<google::protobuf::Message> message)
{
UAS::receiveExtendedMessage(link, message);
}
#endif
void PxQuadMAV::sendProcessCommand(int watchdogId, int processId, unsigned int command) void PxQuadMAV::sendProcessCommand(int watchdogId, int processId, unsigned int command)
{ {
#ifdef MAVLINK_ENABLED_PIXHAWK #ifdef MAVLINK_ENABLED_PIXHAWK
......
...@@ -35,10 +35,6 @@ public: ...@@ -35,10 +35,6 @@ public:
public slots: public slots:
/** @brief Receive a MAVLink message from this MAV */ /** @brief Receive a MAVLink message from this MAV */
void receiveMessage(LinkInterface* link, mavlink_message_t message); void receiveMessage(LinkInterface* link, mavlink_message_t message);
#if defined(QGC_PROTOBUF_ENABLED)
/** @brief Receive a Protobuf message from this MAV */
void receiveExtendedMessage(LinkInterface* link, std::tr1::shared_ptr<google::protobuf::Message> message);
#endif
/** @brief Send a command to an onboard process */ /** @brief Send a command to an onboard process */
void sendProcessCommand(int watchdogId, int processId, unsigned int command); void sendProcessCommand(int watchdogId, int processId, unsigned int command);
signals: signals:
......
...@@ -36,9 +36,6 @@ UASInterface* QGCMAVLinkUASFactory::createUAS(MAVLinkProtocol* mavlink, LinkInte ...@@ -36,9 +36,6 @@ UASInterface* QGCMAVLinkUASFactory::createUAS(MAVLinkProtocol* mavlink, LinkInte
// Connect this robot to the UAS object // Connect this robot to the UAS object
connect(mavlink, SIGNAL(messageReceived(LinkInterface*, mavlink_message_t)), mav, SLOT(receiveMessage(LinkInterface*, mavlink_message_t))); connect(mavlink, SIGNAL(messageReceived(LinkInterface*, mavlink_message_t)), mav, SLOT(receiveMessage(LinkInterface*, mavlink_message_t)));
connect(mavlink, SIGNAL(messageReceived(LinkInterface*,mavlink_message_t)), mav->getFileManager(), SLOT(receiveMessage(LinkInterface*, mavlink_message_t))); connect(mavlink, SIGNAL(messageReceived(LinkInterface*,mavlink_message_t)), mav->getFileManager(), SLOT(receiveMessage(LinkInterface*, mavlink_message_t)));
#ifdef QGC_PROTOBUF_ENABLED
connect(mavlink, SIGNAL(extendedMessageReceived(LinkInterface*, std::tr1::shared_ptr<google::protobuf::Message>)), mav, SLOT(receiveExtendedMessage(LinkInterface*, std::tr1::shared_ptr<google::protobuf::Message>)));
#endif
uas = mav; uas = mav;
} }
break; break;
...@@ -53,9 +50,6 @@ UASInterface* QGCMAVLinkUASFactory::createUAS(MAVLinkProtocol* mavlink, LinkInte ...@@ -53,9 +50,6 @@ UASInterface* QGCMAVLinkUASFactory::createUAS(MAVLinkProtocol* mavlink, LinkInte
// else the slot of the parent object is called (and thus the special // else the slot of the parent object is called (and thus the special
// packets never reach their goal) // packets never reach their goal)
connect(mavlink, SIGNAL(messageReceived(LinkInterface*, mavlink_message_t)), mav, SLOT(receiveMessage(LinkInterface*, mavlink_message_t))); connect(mavlink, SIGNAL(messageReceived(LinkInterface*, mavlink_message_t)), mav, SLOT(receiveMessage(LinkInterface*, mavlink_message_t)));
#ifdef QGC_PROTOBUF_ENABLED
connect(mavlink, SIGNAL(extendedMessageReceived(LinkInterface*, std::tr1::shared_ptr<google::protobuf::Message>)), mav, SLOT(receiveExtendedMessage(LinkInterface*, std::tr1::shared_ptr<google::protobuf::Message>)));
#endif
uas = mav; uas = mav;
} }
break; break;
......
...@@ -250,6 +250,11 @@ void QGCUASFileManager::receiveMessage(LinkInterface* link, mavlink_message_t me ...@@ -250,6 +250,11 @@ void QGCUASFileManager::receiveMessage(LinkInterface* link, mavlink_message_t me
return; return;
} }
// XXX: hack to prevent files from videostream to interfere
if (message.compid != MAV_COMP_ID_IMU) {
return;
}
_clearAckTimeout(); _clearAckTimeout();
mavlink_encapsulated_data_t data; mavlink_encapsulated_data_t data;
......
...@@ -30,10 +30,6 @@ ...@@ -30,10 +30,6 @@
#include <Eigen/Geometry> #include <Eigen/Geometry>
#include <comm/px4_custom_mode.h> #include <comm/px4_custom_mode.h>
#ifdef QGC_PROTOBUF_ENABLED
#include <google/protobuf/descriptor.h>
#endif
/** /**
* Gets the settings from the previous UAS (name, airframe, autopilot, battery specs) * Gets the settings from the previous UAS (name, airframe, autopilot, battery specs)
* by calling readSettings. This means the new UAS will have the same settings * by calling readSettings. This means the new UAS will have the same settings
...@@ -128,14 +124,6 @@ UAS::UAS(MAVLinkProtocol* protocol, QThread* thread, int id) : UASInterface(), ...@@ -128,14 +124,6 @@ UAS::UAS(MAVLinkProtocol* protocol, QThread* thread, int id) : UASInterface(),
nedPosGlobalOffset(0,0,0), nedPosGlobalOffset(0,0,0),
nedAttGlobalOffset(0,0,0), nedAttGlobalOffset(0,0,0),
#if defined(QGC_PROTOBUF_ENABLED) && defined(QGC_USE_PIXHAWK_MESSAGES)
receivedOverlayTimestamp(0.0),
receivedObstacleListTimestamp(0.0),
receivedPathTimestamp(0.0),
receivedPointCloudTimestamp(0.0),
receivedRGBDImageTimestamp(0.0),
#endif
airSpeed(std::numeric_limits<double>::quiet_NaN()), airSpeed(std::numeric_limits<double>::quiet_NaN()),
groundSpeed(std::numeric_limits<double>::quiet_NaN()), groundSpeed(std::numeric_limits<double>::quiet_NaN()),
waypointManager(this), waypointManager(this),
...@@ -1545,105 +1533,6 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message) ...@@ -1545,105 +1533,6 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
} }
} }
#if defined(QGC_PROTOBUF_ENABLED)
/**
* Receive an extended message.
* @param link
* @param message
*/
void UAS::receiveExtendedMessage(LinkInterface* link, std::tr1::shared_ptr<google::protobuf::Message> message)
{
if (!link)
{
return;
}
if (!links->contains(link))
{
addLink(link);
}
const google::protobuf::Descriptor* descriptor = message->GetDescriptor();
if (!descriptor)
{
return;
}
const google::protobuf::FieldDescriptor* headerField = descriptor->FindFieldByName("header");
if (!headerField)
{
return;
}
const google::protobuf::Descriptor* headerDescriptor = headerField->message_type();
if (!headerDescriptor)
{
return;
}
const google::protobuf::FieldDescriptor* sourceSysIdField = headerDescriptor->FindFieldByName("source_sysid");
if (!sourceSysIdField)
{
return;
}
const google::protobuf::Reflection* reflection = message->GetReflection();
const google::protobuf::Message& headerMsg = reflection->GetMessage(*message, headerField);
const google::protobuf::Reflection* headerReflection = headerMsg.GetReflection();
int source_sysid = headerReflection->GetInt32(headerMsg, sourceSysIdField);
if (source_sysid != uasId)
{
return;
}
#ifdef QGC_USE_PIXHAWK_MESSAGES
if (message->GetTypeName() == overlay.GetTypeName())
{
receivedOverlayTimestamp = QGC::groundTimeSeconds();
overlayMutex.lock();
overlay.CopyFrom(*message);
overlayMutex.unlock();
emit overlayChanged(this);
}
else if (message->GetTypeName() == obstacleList.GetTypeName())
{
receivedObstacleListTimestamp = QGC::groundTimeSeconds();
obstacleListMutex.lock();
obstacleList.CopyFrom(*message);
obstacleListMutex.unlock();
emit obstacleListChanged(this);
}
else if (message->GetTypeName() == path.GetTypeName())
{
receivedPathTimestamp = QGC::groundTimeSeconds();
pathMutex.lock();
path.CopyFrom(*message);
pathMutex.unlock();
emit pathChanged(this);
}
else if (message->GetTypeName() == pointCloud.GetTypeName())
{
receivedPointCloudTimestamp = QGC::groundTimeSeconds();
pointCloudMutex.lock();
pointCloud.CopyFrom(*message);
pointCloudMutex.unlock();
emit pointCloudChanged(this);
}
else if (message->GetTypeName() == rgbdImage.GetTypeName())
{
receivedRGBDImageTimestamp = QGC::groundTimeSeconds();
rgbdImageMutex.lock();
rgbdImage.CopyFrom(*message);
rgbdImageMutex.unlock();
emit rgbdImageChanged(this);
}
#endif
}
#endif
/** /**
* Set the home position of the UAS. * Set the home position of the UAS.
* @param lat The latitude fo the home position * @param lat The latitude fo the home position
......
...@@ -45,13 +45,6 @@ This file is part of the QGROUNDCONTROL project ...@@ -45,13 +45,6 @@ This file is part of the QGROUNDCONTROL project
#include "QGCUASParamManagerInterface.h" #include "QGCUASParamManagerInterface.h"
#include "RadioCalibration/RadioCalibrationData.h" #include "RadioCalibration/RadioCalibrationData.h"
#ifdef QGC_PROTOBUF_ENABLED
#include <tr1/memory>
#ifdef QGC_USE_PIXHAWK_MESSAGES
#include <pixhawk/pixhawk.pb.h>
#endif
#endif
class QGCUASFileManager; class QGCUASFileManager;
enum BatteryType enum BatteryType
...@@ -136,19 +129,6 @@ public: ...@@ -136,19 +129,6 @@ public:
virtual bool getSelected() const = 0; virtual bool getSelected() const = 0;
#if defined(QGC_PROTOBUF_ENABLED) && defined(QGC_USE_PIXHAWK_MESSAGES)
virtual px::GLOverlay getOverlay() = 0;
virtual px::GLOverlay getOverlay(qreal& receivedTimestamp) = 0;
virtual px::ObstacleList getObstacleList() = 0;
virtual px::ObstacleList getObstacleList(qreal& receivedTimestamp) = 0;
virtual px::Path getPath() = 0;
virtual px::Path getPath(qreal& receivedTimestamp) = 0;
virtual px::PointCloudXYZRGB getPointCloud() = 0;
virtual px::PointCloudXYZRGB getPointCloud(qreal& receivedTimestamp) = 0;
virtual px::RGBDImage getRGBDImage() = 0;
virtual px::RGBDImage getRGBDImage(qreal& receivedTimestamp) = 0;
#endif
virtual bool isArmed() const = 0; virtual bool isArmed() const = 0;
/** @brief Set the airframe of this MAV */ /** @brief Set the airframe of this MAV */
...@@ -603,19 +583,6 @@ signals: ...@@ -603,19 +583,6 @@ signals:
/** @brief Radio Calibration Data has been received from the MAV*/ /** @brief Radio Calibration Data has been received from the MAV*/
void radioCalibrationReceived(const QPointer<RadioCalibrationData>&); void radioCalibrationReceived(const QPointer<RadioCalibrationData>&);
#if defined(QGC_PROTOBUF_ENABLED) && defined(QGC_USE_PIXHAWK_MESSAGES)
/** @brief Overlay data has been changed */
void overlayChanged(UASInterface* uas);
/** @brief Obstacle list data has been changed */
void obstacleListChanged(UASInterface* uas);
/** @brief Path data has been changed */
void pathChanged(UASInterface* uas);
/** @brief Point cloud data has been changed */
void pointCloudChanged(UASInterface* uas);
/** @brief RGBD image data has been changed */
void rgbdImageChanged(UASInterface* uas);
#endif
/** /**
* @brief Localization quality changed * @brief Localization quality changed
* @param fix 0: lost, 1: 2D local position hold, 2: 2D localization, 3: 3D localization * @param fix 0: lost, 1: 2D local position hold, 2: 2D localization, 3: 3D localization
......
...@@ -47,7 +47,7 @@ DebugConsole::DebugConsole(QWidget *parent) : ...@@ -47,7 +47,7 @@ DebugConsole::DebugConsole(QWidget *parent) :
currLink(NULL), currLink(NULL),
holdOn(false), holdOn(false),
convertToAscii(true), convertToAscii(true),
filterMAVLINK(false), filterMAVLINK(true),
autoHold(true), autoHold(true),
bytesToIgnore(0), bytesToIgnore(0),
lastByte(-1), lastByte(-1),
......
...@@ -190,13 +190,11 @@ void MainWindow::init() ...@@ -190,13 +190,11 @@ void MainWindow::init()
menuActionHelper->setMenu(ui.menuTools); menuActionHelper->setMenu(ui.menuTools);
// Qt 4 on Ubuntu does place the native menubar correctly so on Linux we revert back to in-window menu bar. // Qt 4 on Ubuntu does place the native menubar correctly so on Linux we revert back to in-window menu bar.
// TODO: Check that this is still necessary on Qt5 on Ubuntu
#ifdef Q_OS_LINUX #ifdef Q_OS_LINUX
menuBar()->setNativeMenuBar(false); menuBar()->setNativeMenuBar(false);
#endif #endif
// We only need this menu if we have more than one system
// ui.menuConnected_Systems->setEnabled(false);
// Set dock options // Set dock options
setDockOptions(AnimatedDocks | AllowTabbedDocks | AllowNestedDocks); setDockOptions(AnimatedDocks | AllowTabbedDocks | AllowNestedDocks);
...@@ -437,7 +435,6 @@ MainWindow::~MainWindow() ...@@ -437,7 +435,6 @@ MainWindow::~MainWindow()
} }
} }
// Delete all UAS objects // Delete all UAS objects
delete debugConsole;
delete menuActionHelper; delete menuActionHelper;
for (int i=0;i<commsWidgetList.size();i++) for (int i=0;i<commsWidgetList.size();i++)
{ {
...@@ -665,18 +662,8 @@ void MainWindow::buildCommonWidgets() ...@@ -665,18 +662,8 @@ void MainWindow::buildCommonWidgets()
menuActionHelper->createToolAction(tr("Status Details"), "UAS_STATUS_DETAILS_DOCKWIDGET"); menuActionHelper->createToolAction(tr("Status Details"), "UAS_STATUS_DETAILS_DOCKWIDGET");
{ createDockWidget(pilotView, new DebugConsole(this), tr("Communications Console"), "COMMUNICATION_CONSOLE_DOCKWIDGET", VIEW_FLIGHT, Qt::LeftDockWidgetArea);
if (!debugConsole) //createDockWidget(simView,new HSIDisplay(this),tr("Horizontal Situation"),"HORIZONTAL_SITUATION_INDICATOR_DOCKWIDGET",VIEW_SIMULATION,Qt::BottomDockWidgetArea);
{
debugConsole = new DebugConsole();
debugConsole->setWindowTitle("Communications Console");
debugConsole->hide();
QAction* tempAction = ui.menuTools->addAction(tr("Communication Console"));
tempAction->setCheckable(true);
connect(tempAction,SIGNAL(triggered(bool)),debugConsole,SLOT(setShown(bool)));
}
}
createDockWidget(simView,new HSIDisplay(this),tr("Horizontal Situation"),"HORIZONTAL_SITUATION_INDICATOR_DOCKWIDGET",VIEW_SIMULATION,Qt::BottomDockWidgetArea);
menuActionHelper->createToolAction(tr("Flight Display"), "HEAD_DOWN_DISPLAY_1_DOCKWIDGET"); menuActionHelper->createToolAction(tr("Flight Display"), "HEAD_DOWN_DISPLAY_1_DOCKWIDGET");
menuActionHelper->createToolAction(tr("Actuator Status"), "HEAD_DOWN_DISPLAY_2_DOCKWIDGET"); menuActionHelper->createToolAction(tr("Actuator Status"), "HEAD_DOWN_DISPLAY_2_DOCKWIDGET");
...@@ -685,7 +672,7 @@ void MainWindow::buildCommonWidgets() ...@@ -685,7 +672,7 @@ void MainWindow::buildCommonWidgets()
createDockWidget(engineeringView,new HUD(320,240,this),tr("Video Downlink"),"HEAD_UP_DISPLAY_DOCKWIDGET",VIEW_FLIGHT,Qt::RightDockWidgetArea); createDockWidget(engineeringView,new HUD(320,240,this),tr("Video Downlink"),"HEAD_UP_DISPLAY_DOCKWIDGET",VIEW_FLIGHT,Qt::RightDockWidgetArea);
createDockWidget(simView,new PrimaryFlightDisplay(this),tr("Primary Flight Display"),"PRIMARY_FLIGHT_DISPLAY_DOCKWIDGET",VIEW_SIMULATION,Qt::RightDockWidgetArea); createDockWidget(simView,new PrimaryFlightDisplay(this),tr("Primary Flight Display"),"PRIMARY_FLIGHT_DISPLAY_DOCKWIDGET",VIEW_SIMULATION,Qt::RightDockWidgetArea);
createDockWidget(pilotView,new PrimaryFlightDisplay(this),tr("Primary Flight Display"),"PRIMARY_FLIGHT_DISPLAY_DOCKWIDGET",VIEW_FLIGHT,Qt::LeftDockWidgetArea); createDockWidget(plannerView,new PrimaryFlightDisplay(this),tr("Primary Flight Display"),"PRIMARY_FLIGHT_DISPLAY_DOCKWIDGET",VIEW_FLIGHT,Qt::LeftDockWidgetArea);
QGCTabbedInfoView *infoview = new QGCTabbedInfoView(this); QGCTabbedInfoView *infoview = new QGCTabbedInfoView(this);
infoview->addSource(mavlinkDecoder); infoview->addSource(mavlinkDecoder);
......
...@@ -463,8 +463,6 @@ protected: ...@@ -463,8 +463,6 @@ protected:
QPointer<QGCToolBar> toolBar; QPointer<QGCToolBar> toolBar;
QPointer<QGCStatusBar> customStatusBar; QPointer<QGCStatusBar> customStatusBar;
QPointer<DebugConsole> debugConsole;
QPointer<QDockWidget> mavlinkInspectorWidget; QPointer<QDockWidget> mavlinkInspectorWidget;
QPointer<MAVLinkDecoder> mavlinkDecoder; QPointer<MAVLinkDecoder> mavlinkDecoder;
QPointer<QDockWidget> mavlinkSenderWidget; QPointer<QDockWidget> mavlinkSenderWidget;
......
...@@ -377,6 +377,9 @@ ...@@ -377,6 +377,9 @@
<property name="text"> <property name="text">
<string>Settings</string> <string>Settings</string>
</property> </property>
<property name="toolTip">
<string>Application settings</string>
</property>
</action> </action>
<action name="actionFullscreen"> <action name="actionFullscreen">
<property name="checkable"> <property name="checkable">
...@@ -439,10 +442,10 @@ ...@@ -439,10 +442,10 @@
<normaloff>:/files/images/categories/preferences-system.svg</normaloff>:/files/images/categories/preferences-system.svg</iconset> <normaloff>:/files/images/categories/preferences-system.svg</normaloff>:/files/images/categories/preferences-system.svg</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>Config</string> <string>Vehicle Setup</string>
</property> </property>
<property name="toolTip"> <property name="toolTip">
<string>Configuration options of the vehicle.</string> <string>Hardware setup of the vehicle</string>
</property> </property>
</action> </action>
<action name="actionAdvanced_Mode"> <action name="actionAdvanced_Mode">
......
...@@ -104,8 +104,13 @@ QGCVehicleConfig::QGCVehicleConfig(QWidget *parent) : ...@@ -104,8 +104,13 @@ QGCVehicleConfig::QGCVehicleConfig(QWidget *parent) :
connect(&updateTimer, SIGNAL(timeout()), this, SLOT(updateView())); connect(&updateTimer, SIGNAL(timeout()), this, SLOT(updateView()));
updateTimer.start(); updateTimer.start();
// Make sure the advanced features match what the checkbox indicates on startup and listen for
// future changes.
if (!ui->advancedCheckBox->isChecked())
{
ui->advancedGroupBox->hide(); ui->advancedGroupBox->hide();
connect(ui->advancedCheckBox,SIGNAL(toggled(bool)),ui->advancedGroupBox,SLOT(setShown(bool))); }
connect(ui->advancedCheckBox, SIGNAL(toggled(bool)), ui->advancedGroupBox,SLOT(setVisible(bool)));
} }
void QGCVehicleConfig::rcMenuButtonClicked() void QGCVehicleConfig::rcMenuButtonClicked()
{ {
......
...@@ -132,7 +132,8 @@ SerialConfigurationWindow::SerialConfigurationWindow(LinkInterface* link, QWidge ...@@ -132,7 +132,8 @@ SerialConfigurationWindow::SerialConfigurationWindow(LinkInterface* link, QWidge
connect(ui.parEven, SIGNAL(toggled(bool)), this, SLOT(setParityEven(bool))); connect(ui.parEven, SIGNAL(toggled(bool)), this, SLOT(setParityEven(bool)));
connect(ui.dataBitsSpinBox, SIGNAL(valueChanged(int)), this->link, SLOT(setDataBits(int))); connect(ui.dataBitsSpinBox, SIGNAL(valueChanged(int)), this->link, SLOT(setDataBits(int)));
connect(ui.stopBitsSpinBox, SIGNAL(valueChanged(int)), this->link, SLOT(setStopBits(int))); connect(ui.stopBitsSpinBox, SIGNAL(valueChanged(int)), this->link, SLOT(setStopBits(int)));
connect(ui.advCheckBox,SIGNAL(clicked(bool)),ui.advGroupBox,SLOT(setShown(bool))); connect(ui.advCheckBox, SIGNAL(clicked(bool)), ui.advGroupBox, SLOT(setVisible(bool)));
ui.advCheckBox->setCheckable(true);
ui.advCheckBox->setChecked(false); ui.advCheckBox->setChecked(false);
ui.advGroupBox->setVisible(false); ui.advGroupBox->setVisible(false);
......
...@@ -38,7 +38,7 @@ ApmFirmwareConfig::ApmFirmwareConfig(QWidget *parent) : QWidget(parent) ...@@ -38,7 +38,7 @@ ApmFirmwareConfig::ApmFirmwareConfig(QWidget *parent) : QWidget(parent)
ui.progressBar->setValue(0); ui.progressBar->setValue(0);
ui.textBrowser->setVisible(false); ui.textBrowser->setVisible(false);
connect(ui.showOutputCheckBox,SIGNAL(clicked(bool)),ui.textBrowser,SLOT(setShown(bool))); connect(ui.showOutputCheckBox,SIGNAL(clicked(bool)),ui.textBrowser,SLOT(setVisible(bool)));
/*addBetaLabel(ui.roverPushButton); /*addBetaLabel(ui.roverPushButton);
addBetaLabel(ui.planePushButton); addBetaLabel(ui.planePushButton);
......
...@@ -49,13 +49,13 @@ ApmHardwareConfig::ApmHardwareConfig(QWidget *parent) : QWidget(parent) ...@@ -49,13 +49,13 @@ ApmHardwareConfig::ApmHardwareConfig(QWidget *parent) : QWidget(parent)
ui.osdButton->setVisible(false); ui.osdButton->setVisible(false);
ui.cameraGimbalButton->setVisible(false); ui.cameraGimbalButton->setVisible(false);
connect(ui.optionalHardwareButton,SIGNAL(toggled(bool)),ui.radio3DRButton,SLOT(setShown(bool))); connect(ui.optionalHardwareButton,SIGNAL(toggled(bool)),ui.radio3DRButton,SLOT(setVisible(bool)));
connect(ui.optionalHardwareButton,SIGNAL(toggled(bool)),ui.batteryMonitorButton,SLOT(setShown(bool))); connect(ui.optionalHardwareButton,SIGNAL(toggled(bool)),ui.batteryMonitorButton,SLOT(setVisible(bool)));
connect(ui.optionalHardwareButton,SIGNAL(toggled(bool)),ui.sonarButton,SLOT(setShown(bool))); connect(ui.optionalHardwareButton,SIGNAL(toggled(bool)),ui.sonarButton,SLOT(setVisible(bool)));
connect(ui.optionalHardwareButton,SIGNAL(toggled(bool)),ui.opticalFlowButton,SLOT(setShown(bool))); connect(ui.optionalHardwareButton,SIGNAL(toggled(bool)),ui.opticalFlowButton,SLOT(setVisible(bool)));
connect(ui.optionalHardwareButton,SIGNAL(toggled(bool)),ui.osdButton,SLOT(setShown(bool))); connect(ui.optionalHardwareButton,SIGNAL(toggled(bool)),ui.osdButton,SLOT(setVisible(bool)));
connect(ui.optionalHardwareButton,SIGNAL(toggled(bool)),ui.cameraGimbalButton,SLOT(setShown(bool))); connect(ui.optionalHardwareButton,SIGNAL(toggled(bool)),ui.cameraGimbalButton,SLOT(setVisible(bool)));
connect(ui.optionalHardwareButton,SIGNAL(toggled(bool)),ui.antennaTrackerButton,SLOT(setShown(bool))); connect(ui.optionalHardwareButton,SIGNAL(toggled(bool)),ui.antennaTrackerButton,SLOT(setVisible(bool)));
connect(ui.frameTypeButton,SIGNAL(clicked()),this,SLOT(activateStackedWidget())); connect(ui.frameTypeButton,SIGNAL(clicked()),this,SLOT(activateStackedWidget()));
...@@ -157,27 +157,27 @@ void ApmHardwareConfig::activeUASSet(UASInterface *uas) ...@@ -157,27 +157,27 @@ void ApmHardwareConfig::activeUASSet(UASInterface *uas)
} }
if (uas->getSystemType() == MAV_TYPE_FIXED_WING) if (uas->getSystemType() == MAV_TYPE_FIXED_WING)
{ {
connect(ui.manditoryHardware,SIGNAL(toggled(bool)),ui.compassButton,SLOT(setShown(bool))); connect(ui.manditoryHardware,SIGNAL(toggled(bool)),ui.compassButton,SLOT(setVisible(bool)));
connect(ui.manditoryHardware,SIGNAL(toggled(bool)),ui.arduPlaneLevelButton,SLOT(setShown(bool))); connect(ui.manditoryHardware,SIGNAL(toggled(bool)),ui.arduPlaneLevelButton,SLOT(setVisible(bool)));
connect(ui.manditoryHardware,SIGNAL(toggled(bool)),ui.radioCalibrateButton,SLOT(setShown(bool))); connect(ui.manditoryHardware,SIGNAL(toggled(bool)),ui.radioCalibrateButton,SLOT(setVisible(bool)));
connect(ui.optionalHardwareButton,SIGNAL(toggled(bool)),ui.airspeedButton,SLOT(setShown(bool))); connect(ui.optionalHardwareButton,SIGNAL(toggled(bool)),ui.airspeedButton,SLOT(setVisible(bool)));
} }
else if (uas->getSystemType() == MAV_TYPE_QUADROTOR) else if (uas->getSystemType() == MAV_TYPE_QUADROTOR)
{ {
connect(ui.manditoryHardware,SIGNAL(toggled(bool)),ui.frameTypeButton,SLOT(setShown(bool))); connect(ui.manditoryHardware,SIGNAL(toggled(bool)),ui.frameTypeButton,SLOT(setVisible(bool)));
connect(ui.manditoryHardware,SIGNAL(toggled(bool)),ui.compassButton,SLOT(setShown(bool))); connect(ui.manditoryHardware,SIGNAL(toggled(bool)),ui.compassButton,SLOT(setVisible(bool)));
connect(ui.manditoryHardware,SIGNAL(toggled(bool)),ui.accelCalibrateButton,SLOT(setShown(bool))); connect(ui.manditoryHardware,SIGNAL(toggled(bool)),ui.accelCalibrateButton,SLOT(setVisible(bool)));
connect(ui.manditoryHardware,SIGNAL(toggled(bool)),ui.radioCalibrateButton,SLOT(setShown(bool))); connect(ui.manditoryHardware,SIGNAL(toggled(bool)),ui.radioCalibrateButton,SLOT(setVisible(bool)));
} }
else if (uas->getSystemType() == MAV_TYPE_GROUND_ROVER) else if (uas->getSystemType() == MAV_TYPE_GROUND_ROVER)
{ {
connect(ui.manditoryHardware,SIGNAL(toggled(bool)),ui.compassButton,SLOT(setShown(bool))); connect(ui.manditoryHardware,SIGNAL(toggled(bool)),ui.compassButton,SLOT(setVisible(bool)));
connect(ui.manditoryHardware,SIGNAL(toggled(bool)),ui.radioCalibrateButton,SLOT(setShown(bool))); connect(ui.manditoryHardware,SIGNAL(toggled(bool)),ui.radioCalibrateButton,SLOT(setVisible(bool)));
} }
else else
{ {
connect(ui.manditoryHardware,SIGNAL(toggled(bool)),ui.compassButton,SLOT(setShown(bool))); connect(ui.manditoryHardware,SIGNAL(toggled(bool)),ui.compassButton,SLOT(setVisible(bool)));
connect(ui.manditoryHardware,SIGNAL(toggled(bool)),ui.radioCalibrateButton,SLOT(setShown(bool))); connect(ui.manditoryHardware,SIGNAL(toggled(bool)),ui.radioCalibrateButton,SLOT(setVisible(bool)));
} }
ui.firmwareButton->setVisible(true); ui.firmwareButton->setVisible(true);
ui.manditoryHardware->setVisible(true); ui.manditoryHardware->setVisible(true);
......
...@@ -100,8 +100,6 @@ IncrementalPlot::IncrementalPlot(QWidget *parent): ...@@ -100,8 +100,6 @@ IncrementalPlot::IncrementalPlot(QWidget *parent):
resetScaling(); resetScaling();
legend = NULL; legend = NULL;
connect(this, SIGNAL(legendChecked(QwtPlotItem*,bool)), this, SLOT(handleLegendClick(QwtPlotItem*,bool)));
} }
IncrementalPlot::~IncrementalPlot() IncrementalPlot::~IncrementalPlot()
......
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