Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
78b9e3f5
Commit
78b9e3f5
authored
Apr 07, 2010
by
Hugo Vincent
Browse files
Options
Browse Files
Download
Plain Diff
More cleanups
parents
2291af59
97378dc0
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
197 additions
and
183 deletions
+197
-183
README
README
+7
-0
macx.icns
images/icons/macx.icns
+0
-0
mavground.pri
mavground.pri
+163
-166
AudioOutput.cc
src/AudioOutput.cc
+11
-12
AudioOutput.h
src/AudioOutput.h
+15
-4
Core.cc
src/Core.cc
+1
-1
No files found.
README
View file @
78b9e3f5
...
@@ -2,4 +2,11 @@ PIXHAWK Open Source Groundstation
...
@@ -2,4 +2,11 @@ PIXHAWK Open Source Groundstation
http://pixhawk.ethz.ch
http://pixhawk.ethz.ch
To build on Mac OS X (10.5 or later):
1) Install http://www.libsdl.org/release/SDL-1.2.14.dmg
2) Install Qt 4.6.2 with Cocoa http://get.qt.nokia.com/qt/source/qt-mac-cocoa-opensource-4.6.2.dmg
3) Run qmake
4) Run "xcodebuild -configuration Release" or open "opengroundcontrol.xcodeproj" in Xcode and build.
images/icons/macx.icns
0 → 100644
View file @
78b9e3f5
File added
mavground.pri
View file @
78b9e3f5
#-------------------------------------------------
#-------------------------------------------------
#
#
# MAVGround - Micro Air Vehicle Groundstation
# MAVGround - Micro Air Vehicle Groundstation
#
#
# Please see our website at <http://pixhawk.ethz.ch>
# Please see our website at <http://pixhawk.ethz.ch>
#
#
# Original Author:
# Original Author:
# Lorenz Meier <mavteam@student.ethz.ch>
# Lorenz Meier <mavteam@student.ethz.ch>
#
#
# Contributing Authors (in alphabetical order):
# Contributing Authors (in alphabetical order):
#
#
# (c) 2009 PIXHAWK Team
# (c) 2009 PIXHAWK Team
#
#
# This file is part of the mav groundstation project
# This file is part of the mav groundstation project
# MAVGround is free software: you can redistribute it and/or modify
# MAVGround is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# (at your option) any later version.
# MAVGround is distributed in the hope that it will be useful,
# MAVGround is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# You should have received a copy of the GNU General Public License
# along with MAVGround. If not, see <http://www.gnu.org/licenses/>.
# along with MAVGround. If not, see <http://www.gnu.org/licenses/>.
#
#
#-------------------------------------------------
#-------------------------------------------------
QT += network opengl svg xml
QT += network opengl svg xml
TEMPLATE = app
TEMPLATE = app
TARGET = opengroundcontrol
TARGET = opengroundcontrol
BASEDIR = .
BASEDIR = .
BUILDDIR = build
BUILDDIR = build
LANGUAGE = C++
LANGUAGE = C++
#CONFIG += static debug
#CONFIG += static debug
#CONFIG += static release console
#CONFIG += static release console
CONFIG += static debug_and_release console
CONFIG += static debug_and_release console
QMAKE_CFLAGS += -j8
QMAKE_CFLAGS += -j8
OBJECTS_DIR = $$BUILDDIR/obj
OBJECTS_DIR = $$BUILDDIR/obj
MOC_DIR = $$BUILDDIR/moc
MOC_DIR = $$BUILDDIR/moc
UI_HEADERS_DIR = src/ui/generated
UI_HEADERS_DIR = src/ui/generated
# Add external libraries
# Add external libraries
INCLUDEPATH += $$BASEDIR/lib/flite/include \
INCLUDEPATH += $$BASEDIR/lib/flite/include \
$$BASEDIR/lib/flite/lang
$$BASEDIR/lib/flite/lang
#$$BASEDIR/lib/qextserialport/include
#$$BASEDIR/lib/qextserialport/include
# $$BASEDIR/lib/openjaus/libjaus/include \
# $$BASEDIR/lib/openjaus/libjaus/include \
# $$BASEDIR/lib/openjaus/libopenJaus/include
# $$BASEDIR/lib/openjaus/libopenJaus/include
message(Qt version> $$[QMAKESPEC])
message(Qt version $$[QT_VERSION])
# MAC OS X
# MAC OS X
macx {
macx {
message(Building for Mac OS X)
message(Building for Mac OS X)
CONFIG += x86_64
CONFIG += x86_64 cocoa
CONFIG -= x86 static
CONFIG -= static
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.5
DESTDIR = $$BASEDIR/bin/mac
INCLUDEPATH += -framework SDL \
DESTDIR = $$BASEDIR/bin/mac
/Users/hugo/Projects/PixHawkGroundControl/MAVLink/src
INCLUDEPATH += -framework SDL \
$$BASEDIR/MAVLink/src
LIBS += -framework IOKit \
-framework SDL \
LIBS += -framework IOKit \
-framework CoreFoundation \
-framework SDL \
-framework ApplicationServices \
-framework CoreFoundation \
-lm
-framework ApplicationServices \
-lm
DEFINES += _TTY_POSIX_
DEFINES += _TTY_POSIX_
#ICON = $$BASEDIR/img/icons/empty.png
}
ICON = $$BASEDIR/images/icons/macx.icns
}
# GNU/Linux
linux-g++ {
# GNU/Linux
linux-g++ {
message(Building for GNU/Linux)
message(Building for GNU/Linux)
QT += phonon
QT += phonon
debug {
DESTDIR = $$BASEDIR
debug {
}
DESTDIR = $$BASEDIR
}
release {
DESTDIR = $$BASEDIR
release {
}
DESTDIR = $$BASEDIR
INCLUDEPATH += /usr/include/SDL
}
# /usr/include/qwt-qt4
INCLUDEPATH += /usr/include/SDL
#-L$$BASEDIR/lib/qwt/linux \
DEFINES += _TTY_POSIX_
HARDWARE_PLATFORM = $$system(uname -a)
DEFINES += _TTY_POSIX_
contains( HARDWARE_PLATFORM, x86_64 ) {
# 64-bit Linux
HARDWARE_PLATFORM = $$system(uname -a)
LIBS += \
contains( HARDWARE_PLATFORM, x86_64 ) {
-L$$BASEDIR/lib/flite/linux64 \
# 64-bit Linux
-lm \
LIBS += \
-lflite_cmu_us_awb \
-L$$BASEDIR/lib/flite/linux64 \
-lflite_cmu_us_rms \
-lm \
-lflite_cmu_us_slt \
-lflite_cmu_us_awb \
-lflite_usenglish \
-lflite_cmu_us_rms \
-lflite_cmulex \
-lflite_cmu_us_slt \
-lflite \
-lflite_usenglish \
-lSDL \
-lflite_cmulex \
-lSDLmain
-lflite \
} else {
-lSDL \
# 32-bit Linux
-lSDLmain
LIBS += \
} else {
-L$$BASEDIR/lib/flite/linux32 \
# 32-bit Linux
-lm \
LIBS += \
-lflite_cmu_us_awb \
-L$$BASEDIR/lib/flite/linux32 \
-lflite_cmu_us_rms \
-lm \
-lflite_cmu_us_slt \
-lflite_cmu_us_awb \
-lflite_usenglish \
-lflite_cmu_us_rms \
-lflite_cmulex \
-lflite_cmu_us_slt \
-lflite \
-lflite_usenglish \
-lSDL \
-lflite_cmulex \
-lSDLmain
-lflite \
}
-lSDL \
}
-lSDLmain
}
}
# Windows (32bit)
win32 {
# Windows (32bit)
message(Building for Windows Platform (32/64bit))
win32 {
# Special settings for debug
message(Building for Windows Platform (32/64bit))
#CONFIG += CONSOLE
LIBS += -L$$BASEDIR\lib\sdl\win32 \
# Special settings for debug
-lmingw32 -lSDLmain -lSDL -mwindows
#CONFIG += CONSOLE
LIBS += -L$$BASEDIR\lib\sdl\win32 \
INCLUDEPATH += $$BASEDIR/lib/sdl/include/SDL
-lmingw32 -lSDLmain -lSDL -mwindows
#LIBS += -L$$BASEDIR\lib\qextserialport\win32 \
INCLUDEPATH += $$BASEDIR/lib/sdl/include/SDL
# -lqextserialport \
# -lsetupapi
#LIBS += -L$$BASEDIR\lib\qextserialport\win32 \
# -L$$BASEDIR/lib/openjaus/libjaus/lib/win32 \
# -lqextserialport \
# -ljaus \
# -lsetupapi
# -L$$BASEDIR/lib/openjaus/libopenJaus/lib/win32 \
# -L$$BASEDIR/lib/openjaus/libjaus/lib/win32 \
# -lopenjaus
# -ljaus \
# -L$$BASEDIR/lib/openjaus/libopenJaus/lib/win32 \
DEFINES += _TTY_WIN_
# -lopenjaus
debug {
DEFINES += _TTY_WIN_
DESTDIR = $$BASEDIR/bin
}
debug {
DESTDIR = $$BASEDIR/bin
release {
}
DESTDIR = $$BASEDIR/bin
}
release {
DESTDIR = $$BASEDIR/bin
}
}
}
src/AudioOutput.cc
View file @
78b9e3f5
#include "AudioOutput.h"
#include "AudioOutput.h"
#ifndef Q_OS_MAC
#ifdef Q_OS_MAC
#include <ApplicationServices/ApplicationServices.h>
#else
#include <flite.h>
#include <flite.h>
#include <phonon/mediaobject.h>
#include <phonon/mediaobject.h>
#include <QTemporaryFile>
#include <QTemporaryFile>
#else
#include <ApplicationServices/ApplicationServices.h>
#endif
#endif
#include <QDebug>
#include <QDebug>
...
@@ -25,9 +25,10 @@ extern "C" {
...
@@ -25,9 +25,10 @@ extern "C" {
};
};
#endif
#endif
AudioOutput
::
AudioOutput
(
QString
voice
,
QObject
*
parent
)
:
QObject
(
parent
),
AudioOutput
::
AudioOutput
(
QString
voice
,
QObject
*
parent
)
voice
(
NULL
),
:
QObject
(
parent
),
voiceIndex
(
0
)
voice
(
NULL
),
voiceIndex
(
0
)
{
{
#if !defined(Q_OS_WIN32) && !defined(Q_OS_MAC)
#if !defined(Q_OS_WIN32) && !defined(Q_OS_MAC)
flite_init
();
flite_init
();
...
@@ -72,6 +73,7 @@ bool AudioOutput::say(QString text, int severity)
...
@@ -72,6 +73,7 @@ bool AudioOutput::say(QString text, int severity)
#if defined(Q_OS_WIN32)
#if defined(Q_OS_WIN32)
qDebug
()
<<
"Synthesized: "
<<
text
<<
", NO OUTPUT SUPPORT ON WINDOWS!"
;
qDebug
()
<<
"Synthesized: "
<<
text
<<
", NO OUTPUT SUPPORT ON WINDOWS!"
;
#elif defined(Q_OS_MAC)
#elif defined(Q_OS_MAC)
// FIXME, copy string, set callback to free the copy
SpeakString
((
const
unsigned
char
*
)
text
.
toAscii
().
data
());
SpeakString
((
const
unsigned
char
*
)
text
.
toAscii
().
data
());
qDebug
()
<<
"Synthesized: "
<<
text
;
qDebug
()
<<
"Synthesized: "
<<
text
;
#else
#else
...
@@ -137,13 +139,11 @@ extern "C" {
...
@@ -137,13 +139,11 @@ extern "C" {
#endif
/* __cplusplus */
#endif
/* __cplusplus */
QStringList
AudioOutput
::
listVoices
(
void
)
QStringList
AudioOutput
::
listVoices
(
void
)
{
{
QStringList
l
;
#if !defined(Q_OS_WIN32) && !defined(Q_OS_MAC)
cst_voice
*
voice
;
cst_voice
*
voice
;
const
cst_val
*
v
;
const
cst_val
*
v
;
QStringList
l
;
#if !defined(Q_OS_WIN32) && !defined(Q_OS_MAC)
/*
/*
printf("Voices available: ");
printf("Voices available: ");
for (v=flite_voice_list; v; v=val_cdr(v))
for (v=flite_voice_list; v; v=val_cdr(v))
...
@@ -157,8 +157,7 @@ extern "C" {
...
@@ -157,8 +157,7 @@ extern "C" {
printf("\n");
printf("\n");
*/
*/
#endif
#endif
return
l
;
return
l
;
}
}
#ifdef __cplusplus
#ifdef __cplusplus
}
}
...
...
src/AudioOutput.h
View file @
78b9e3f5
...
@@ -3,7 +3,14 @@
...
@@ -3,7 +3,14 @@
#include <QObject>
#include <QObject>
#include <QStringList>
#include <QStringList>
#include <flite.h>
/* Foward declarations of speech/voice structure */
#ifdef Q_OS_MAC
struct
SpeechChannelRecord
;
typedef
SpeechChannelRecord
*
SpeechChannel
;
#else
struct
cst_voice
;
#endif
class
AudioOutput
:
public
QObject
class
AudioOutput
:
public
QObject
{
{
...
@@ -28,10 +35,14 @@ public:
...
@@ -28,10 +35,14 @@ public:
void
selectMaleVoice
();
void
selectMaleVoice
();
/** @brief Select neutral voice */
/** @brief Select neutral voice */
void
selectNeutralVoice
();
void
selectNeutralVoice
();
protected:
cst_voice
*
voice
;
int
voiceIndex
;
protected:
#ifdef Q_OS_MAC
SpeechChannel
*
voice
;
#else
cst_voice
*
voice
;
#endif
int
voiceIndex
;
};
};
#endif // AUDIOOUTPUT_H
#endif // AUDIOOUTPUT_H
src/Core.cc
View file @
78b9e3f5
...
@@ -69,7 +69,7 @@ MGCore::MGCore(int &argc, char* argv[]) : QApplication(argc, argv)
...
@@ -69,7 +69,7 @@ MGCore::MGCore(int &argc, char* argv[]) : QApplication(argc, argv)
QFontDatabase
fontDatabase
=
QFontDatabase
();
QFontDatabase
fontDatabase
=
QFontDatabase
();
const
QString
fontFileName
=
":/general/vera.ttf"
;
///< Font file is part of the QRC file and compiled into the app
const
QString
fontFileName
=
":/general/vera.ttf"
;
///< Font file is part of the QRC file and compiled into the app
const
QString
fontFamilyName
=
"Bitstream Vera Sans"
;
const
QString
fontFamilyName
=
"Bitstream Vera Sans"
;
if
(
!
QFile
::
exists
(
fontFileName
))
printf
(
"ERROR! font file: %s DOES NOT EXIST!
\n
"
,
fontFileName
.
to
Ascii
().
data
());
if
(
!
QFile
::
exists
(
fontFileName
))
printf
(
"ERROR! font file: %s DOES NOT EXIST!
\n
"
,
fontFileName
.
to
StdString
().
c_str
());
fontDatabase
.
addApplicationFont
(
fontFileName
);
fontDatabase
.
addApplicationFont
(
fontFileName
);
setFont
(
fontDatabase
.
font
(
fontFamilyName
,
"Roman"
,
12
));
setFont
(
fontDatabase
.
font
(
fontFamilyName
,
"Roman"
,
12
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment