Commit 4d98070c authored by Lorenz Meier's avatar Lorenz Meier

Merge branch 'config' of github.com:mavlink/qgroundcontrol into config

parents 58713677 edc7dcc1
......@@ -1532,15 +1532,8 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
{
unknownPackets.append(message.msgid);
// XXX Do NOT show this to users, as they will attribute
// completely random problems to this message and won't
// even bother to look up what the message actually is.
// QString errString = tr("UNABLE TO DECODE MESSAGE NUMBER %1").arg(message.msgid);
// //GAudioOutput::instance()->say(errString+tr(", please check console for details."));
// emit textMessageReceived(uasId, message.compid, 255, errString);
// std::cout << "Unable to decode message from system " << std::dec << static_cast<int>(message.sysid) << " with message id:" << static_cast<int>(message.msgid) << std::endl;
// //qDebug() << std::cerr << "Unable to decode message from system " << std::dec << static_cast<int>(message.acid) << " with message id:" << static_cast<int>(message.msgid) << std::endl;
emit unknownPacketReceived(uasId, message.compid, message.msgid);
qWarning() << "Unknown message from system:" << uasId << "message:" << message.msgid;
}
}
break;
......
......@@ -643,6 +643,9 @@ signals:
// HOME POSITION / ORIGIN CHANGES
void homePositionChanged(int uas, double lat, double lon, double alt);
/** @brief The system received an unknown message, which it could not interpret */
void unknownPacketReceived(int uas, int component, int messageid);
protected:
// TIMEOUT CONSTANTS
......
......@@ -106,7 +106,7 @@ MainWindow* MainWindow::instance_mode(QSplashScreen* screen, enum MainWindow::CU
MainWindow* MainWindow::instance(QSplashScreen* screen)
{
instance_mode(screen, CUSTOM_MODE_NONE);
return instance_mode(screen, CUSTOM_MODE_UNCHANGED);
}
/**
......@@ -131,7 +131,7 @@ MainWindow::MainWindow(QWidget *parent):
isAdvancedMode(false),
mavlink(new MAVLinkProtocol()),
dockWidgetTitleBarEnabled(true),
customMode(CUSTOM_MODE_WIFI)
customMode(CUSTOM_MODE_NONE)
{
this->setAttribute(Qt::WA_DeleteOnClose);
//TODO: move protocol outside UI
......@@ -1344,6 +1344,7 @@ bool MainWindow::loadStyle(QGC_MAINWINDOW_STYLE style, QString cssFile)
// And trigger any changes to other UI elements that are watching for
// theme changes.
emit styleChanged(style);
emit styleChanged();
// Finally restore the cursor before returning.
qApp->restoreOverrideCursor();
......
......@@ -98,7 +98,8 @@ class MainWindow : public QMainWindow
public:
enum CUSTOM_MODE {
CUSTOM_MODE_NONE = 0,
CUSTOM_MODE_UNCHANGED = 0,
CUSTOM_MODE_NONE,
CUSTOM_MODE_PX4,
CUSTOM_MODE_APM,
CUSTOM_MODE_WIFI
......@@ -177,7 +178,10 @@ public:
void setCustomMode(enum MainWindow::CUSTOM_MODE mode)
{
customMode = mode;
if (mode != CUSTOM_MODE_UNCHANGED)
{
customMode = mode;
}
}
enum MainWindow::CUSTOM_MODE getCustomMode()
......@@ -307,6 +311,7 @@ public slots:
signals:
void styleChanged(MainWindow::QGC_MAINWINDOW_STYLE newTheme);
void styleChanged();
void initStatusChanged(const QString& message, int alignment, const QColor &color);
#ifdef MOUSE_ENABLED_LINUX
/** @brief Forward X11Event to catch 3DMouse inputs */
......@@ -502,6 +507,7 @@ protected:
bool lowPowerMode; ///< If enabled, QGC reduces the update rates of all widgets
QGCFlightGearLink* fgLink;
QTimer windowNameUpdateTimer;
CUSTOM_MODE customMode;
private:
QList<QObject*> commsWidgetList;
......@@ -511,7 +517,6 @@ private:
QMap<VIEW_SECTIONS,QMap<QString,QWidget*> > centralWidgetToDockWidgetsMap;
bool isAdvancedMode; ///< If enabled dock widgets can be moved and floated.
bool dockWidgetTitleBarEnabled; ///< If enabled, dock widget titlebars are displayed when NOT in advanced mode.
CUSTOM_MODE customMode;
Ui::MainWindow ui;
/** @brief Set the appropriate titlebar for a given dock widget.
......
......@@ -137,14 +137,7 @@ LinechartWidget::LinechartWidget(int systemid, QWidget *parent) : QWidget(parent
// Create the layout
createLayout();
// Add the last actions
//connect(this, SIGNAL(plotWindowPositionUpdated(int)), scrollbar, SLOT(setValue(int)));
//connect(scrollbar, SIGNAL(sliderMoved(int)), this, SLOT(setPlotWindowPosition(int)));
// And make sure we're listening for future style changes
connect(MainWindow::instance(), SIGNAL(styleChanged(MainWindow::QGC_MAINWINDOW_STYLE)),
this, SLOT(styleChanged(MainWindow::QGC_MAINWINDOW_STYLE)));
connect(MainWindow::instance(), SIGNAL(styleChanged()), this, SLOT(recolor()));
updateTimer->setInterval(updateInterval);
......
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