diff --git a/src/GAudioOutput.cc b/src/GAudioOutput.cc index fd468bc..d1a5d49 100644 --- a/src/GAudioOutput.cc +++ b/src/GAudioOutput.cc @@ -165,10 +165,11 @@ bool GAudioOutput::alert(QString text) if (!emergency) { // Play alert sound - m_media->setCurrentSource(Phonon::MediaSource(QString("alert.wav").toStdString().c_str())); + QString alertFile = QCoreApplication::applicationDirPath() + "alert.wav"; + m_media->setCurrentSource(Phonon::MediaSource(alertFile.toStdString().c_str())); qDebug() << "FILENAME:" << m_media->currentSource().fileName(); qDebug() << "TYPE:" << m_media->currentSource().type(); - qDebug() << QString("alert.wav").toStdString().c_str(); + qDebug() << alertFile.toStdString().c_str(); m_media->play(); m_media->setCurrentSource(Phonon::MediaSource(QString("alert.wav").toStdString().c_str())); m_media->play(); diff --git a/src/ui/MainWindow.cc b/src/ui/MainWindow.cc index 3fb2a7e..6259ceb 100644 --- a/src/ui/MainWindow.cc +++ b/src/ui/MainWindow.cc @@ -58,19 +58,13 @@ This file is part of the QGROUNDCONTROL project * * @see QMainWindow::show() **/ -MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) +MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), + settings() { - this->hide(); this->setVisible(false); - // Quick hack - //comp = new LogCompressor("/home/pixhawk/Desktop/test.txt"); - mavlink = new MAVLinkProtocol(); - //as4link = new AS4Protocol(); - - // MG::DISPLAY::setPixelSize(0.224f); // Setup user interface ui.setupUi(this); @@ -107,6 +101,9 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) acceptList->append("roll IMU"); acceptList->append("pitch IMU"); acceptList->append("yaw IMU"); + acceptList->append("vx"); + acceptList->append("vy"); + acceptList->append("vz"); headDown1 = new HDDisplay(acceptList, this); headDown1->setVisible(false); @@ -502,6 +499,11 @@ void MainWindow::loadEngineerView() this->show(); } +void MainWindow::loadAllView() +{ + +} + void MainWindow::loadWidgets() { loadOperatorView(); diff --git a/src/ui/MainWindow.h b/src/ui/MainWindow.h index 4ea40db..8418eee 100644 --- a/src/ui/MainWindow.h +++ b/src/ui/MainWindow.h @@ -34,6 +34,7 @@ This file is part of the PIXHAWK project #include #include #include +#include #include "ui_MainWindow.h" #include "LinkManager.h" @@ -75,6 +76,7 @@ public: MainWindow(QWidget *parent = 0); ~MainWindow(); + QSettings settings; UASControlWidget* control; LinechartWidget* linechart; UASInfoWidget* info; @@ -128,6 +130,8 @@ public slots: void loadOperatorView(); /** @brief Load view for general settings */ void loadSettingsView(); + /** @brief Load view with all widgets */ + void loadAllView(); void reloadStylesheet();