diff --git a/audio/opengroundcontrol b/audio/opengroundcontrol deleted file mode 100755 index 99d22a0..0000000 Binary files a/audio/opengroundcontrol and /dev/null differ diff --git a/mavground.pri b/mavground.pri index 885a72b..20eb81f 100644 --- a/mavground.pri +++ b/mavground.pri @@ -2,7 +2,7 @@ # # MAVGround - Micro Air Vehicle Groundstation # -# Please see our website at +# Please see our website at # # Original Author: # Lorenz Meier @@ -37,8 +37,6 @@ LANGUAGE = C++ #CONFIG += static debug #CONFIG += static release console CONFIG += static debug_and_release console -#QMAKE_CFLAGS += -j8 -#QMAKE_CXXFLAGS += -j8 OBJECTS_DIR = $$BUILDDIR/obj MOC_DIR = $$BUILDDIR/moc @@ -60,14 +58,16 @@ message(Qt version $$[QT_VERSION]) # MAC OS X macx { - message(Building for Mac OS X) - config -= static - - HARDWARE_PLATFORM = $$system(g++ -dumpspecs) - contains( HARDWARE_PLATFORM, m64 ) { - message(Building as 64-bit) - CONFIG += x86_64 - CONFIG -= x86 + HARDWARE_PLATFORM = $$system(uname -a) + contains( HARDWARE_PLATFORM, x86_64 ) { + # x64 Mac OS X Snow Leopard 10.6 and later + CONFIG += x86_64 cocoa + CONFIG -= x86 static phonon + message(Building for Mac OS X 64bit/Snow Leopard 10.6 and later) + } else { + # x86 Mac OS X Leopard 10.5 and earlier + CONFIG += x86 cocoa static phonon + message(Building for Mac OS X 32bit/Leopard 10.5 and earlier) } QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.5 @@ -84,8 +84,8 @@ macx { # Enable function-profiling with the OS X saturn tool debug { - #QMAKE_CXXFLAGS += -finstrument-functions - #LIBS += -lSaturn + QMAKE_CXXFLAGS += -finstrument-functions + LIBS += -lSaturn } ICON = $$BASEDIR/images/icons/macx.icns @@ -101,9 +101,9 @@ linux-g++ { release { DESTDIR = $$BASEDIR } - INCLUDEPATH += /usr/include/SDL + INCLUDEPATH += /usr/include - HARDWARE_PLATFORM = $$system(uname -p) + HARDWARE_PLATFORM = $$system(uname -a) contains( HARDWARE_PLATFORM, x86_64 ) { # 64-bit Linux LIBS += \ @@ -137,7 +137,7 @@ win32 { LIBS += -L$$BASEDIR\lib\sdl\win32 \ -lmingw32 -lSDLmain -lSDL -mwindows - INCLUDEPATH += $$BASEDIR/lib/sdl/include/SDL + INCLUDEPATH += $$BASEDIR/lib/sdl/include debug { DESTDIR = $$BASEDIR/bin @@ -150,3 +150,4 @@ win32 { } + diff --git a/src/Core.cc b/src/Core.cc index c078b24..7ffa5c8 100644 --- a/src/Core.cc +++ b/src/Core.cc @@ -58,7 +58,7 @@ This file is part of the PIXHAWK project Core::Core(int &argc, char* argv[]) : QApplication(argc, argv) { - this->setApplicationName("OpenMAV Ground Control Station"); + this->setApplicationName("QGroundControl"); this->setApplicationVersion("v. 0.0.5"); this->setOrganizationName(QLatin1String("OpenMAV Association")); this->setOrganizationDomain("http://qgroundcontrol.org"); @@ -89,9 +89,6 @@ Core::Core(int &argc, char* argv[]) : QApplication(argc, argv) splashScreen->showMessage(tr("Starting UAS Manager"), Qt::AlignLeft | Qt::AlignBottom, QColor(62, 93, 141)); startUASManager(); - // Start audio output - //GAudioOutput::instance()->say("Ground Control Station started", 1); - //tarsus = new ViconTarsusProtocol(); //tarsus->start(); diff --git a/src/GAudioOutput.cc b/src/GAudioOutput.cc index a2059e8..cac132a 100644 --- a/src/GAudioOutput.cc +++ b/src/GAudioOutput.cc @@ -193,7 +193,9 @@ bool GAudioOutput::startEmergency() if (!emergency) { emergency = true; - emergencyTimer->start(1600); + // Beep immediately and then start timer + beep(); + emergencyTimer->start(1500); } return true; } @@ -216,7 +218,9 @@ bool GAudioOutput::stopEmergency() void GAudioOutput::beep() { - m_media->setCurrentSource(Phonon::MediaSource(QString("alert.wav").toStdString().c_str())); + // Use QFile to transform path for all OS + QFile f(MG::DIR::getSupportFilesDirectory()+QString("/audio/alert.wav")); + m_media->setCurrentSource(Phonon::MediaSource(f.fileName().toStdString().c_str())); m_media->play(); }