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
60e0f0ff
Commit
60e0f0ff
authored
Apr 10, 2010
by
pixhawk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added windows audio
parent
3385b837
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
108 additions
and
25 deletions
+108
-25
QMapControl.pri
lib/QMapControl/QMapControl.pri
+0
-4
mavground.pri
mavground.pri
+11
-13
mavground.pro
mavground.pro
+3
-1
GAudioOutput.cc
src/GAudioOutput.cc
+15
-4
qmapcontrol.pri
src/lib/qmapcontrol/qmapcontrol.pri
+52
-0
JoystickWidget.cc
src/ui/JoystickWidget.cc
+16
-1
JoystickWidget.h
src/ui/JoystickWidget.h
+11
-2
No files found.
lib/QMapControl/QMapControl.pri
View file @
60e0f0ff
DEPENDPATH += src
INCLUDEPATH += src
MOC_DIR = tmp
OBJECTS_DIR = obj
# Input
HEADERS += curve.h \
...
...
@@ -52,5 +50,3 @@ SOURCES += curve.cpp \
openaerialmapadapter.cpp \
fixedimageoverlay.cpp \
emptymapadapter.cpp
QT += network
mavground.pri
View file @
60e0f0ff
...
...
@@ -28,7 +28,7 @@
QT += network opengl svg xml phonon
TEMPLATE = app
TARGET =
open
groundcontrol
TARGET =
q
groundcontrol
BASEDIR = .
BUILDDIR = build
...
...
@@ -38,6 +38,7 @@ LANGUAGE = C++
#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 +61,11 @@ message(Qt version> $$[QMAKESPEC])
# MAC OS X
macx {
message(Building for Mac OS X)
message(Building for Mac OS X
32/64bit
)
CONFIG += x86
contains ( DEFINES, QT_MAC_USE_COCOA ) {
CONFIG += x86_64 cocoa
CONFIG -= static
}
#CONFIG += x86
CONFIG += x86_64 cocoa
CONFIG -= static
DESTDIR = $$BASEDIR/bin/mac
...
...
@@ -79,7 +77,11 @@ macx {
-framework ApplicationServices \
-lm
DEFINES += _TTY_POSIX_
# Enable function-profiling with the OS X saturn tool
debug {
#QMAKE_CXXFLAGS += -finstrument-functions
#LIBS += -lSaturn
}
#ICON = $$BASEDIR/img/icons/empty.png
}
...
...
@@ -98,8 +100,6 @@ linux-g++ {
}
INCLUDEPATH += /usr/include/SDL
DEFINES += _TTY_POSIX_
HARDWARE_PLATFORM = $$system(uname -a)
contains( HARDWARE_PLATFORM, x86_64 ) {
# 64-bit Linux
...
...
@@ -142,8 +142,6 @@ win32 {
-lmingw32 -lSDLmain -lSDL -mwindows
INCLUDEPATH += $$BASEDIR/lib/sdl/include/SDL
DEFINES += _TTY_WIN_
debug {
DESTDIR = $$BASEDIR/bin
...
...
mavground.pro
View file @
60e0f0ff
...
...
@@ -11,7 +11,9 @@ include(src/lib/qwt/qwt.pri)
#
include
(
src
/
lib
/
flite
/
flite
.
pri
)
#
Include
QMapControl
map
library
include
(
lib
/
QMapControl
/
QMapControl
.
pri
)
include
(
src
/
lib
/
qmapcontrol
/
qmapcontrol
.
pri
)
#
include
(
lib
/
QMapControl
/
QMapControl
.
pri
)
DEPENDPATH
+=
.
\
lib
/
QMapControl
\
lib
/
QMapControl
/
src
...
...
src/GAudioOutput.cc
View file @
60e0f0ff
...
...
@@ -30,16 +30,21 @@ This file is part of the PIXHAWK project
*/
#include <QApplication>
#include <QTemporaryFile>
#include "GAudioOutput.h"
#include "MG.h"
#include <QDebug>
#ifdef Q_OS_MAC
#include <ApplicationServices/ApplicationServices.h>
#endif
#include <QTemporaryFile>
#include <QDebug>
#ifdef Q_OS_WINDOWS
#include <windows.h>
using
System
;
using
System
.
Speech
.
Synthesis
;
#endif
#ifndef Q_OS_MAC
extern
"C"
{
...
...
@@ -110,7 +115,13 @@ bool GAudioOutput::say(QString text, int severity)
bool
res
=
false
;
if
(
!
emergency
)
{
// Only give speech output on Linux and MacOS
#ifdef Q_OS_WINDOWS
SpeechSynthesizer
synth
=
new
SpeechSynthesizer
();
synth
.
SelectVoice
(
"Microsoft Anna"
);
synth
.
SpeakText
(
"Hello, world!"
);
#endif
#ifdef Q_OS_LINUX
QTemporaryFile
file
;
file
.
setFileTemplate
(
"XXXXXX.wav"
);
...
...
src/lib/qmapcontrol/qmapcontrol.pri
0 → 100644
View file @
60e0f0ff
DEPENDPATH += src
INCLUDEPATH += src
# Input
HEADERS += curve.h \
geometry.h \
imagemanager.h \
layer.h \
layermanager.h \
linestring.h \
mapadapter.h \
mapcontrol.h \
mapnetwork.h \
point.h \
tilemapadapter.h \
wmsmapadapter.h \
circlepoint.h \
imagepoint.h \
gps_position.h \
osmmapadapter.h \
maplayer.h \
geometrylayer.h \
yahoomapadapter.h \
googlemapadapter.h \
googlesatmapadapter.h \
openaerialmapadapter.h \
fixedimageoverlay.h \
emptymapadapter.h
SOURCES += curve.cpp \
geometry.cpp \
imagemanager.cpp \
layer.cpp \
layermanager.cpp \
linestring.cpp \
mapadapter.cpp \
mapcontrol.cpp \
mapnetwork.cpp \
point.cpp \
tilemapadapter.cpp \
wmsmapadapter.cpp \
circlepoint.cpp \
imagepoint.cpp \
gps_position.cpp \
osmmapadapter.cpp \
maplayer.cpp \
geometrylayer.cpp \
yahoomapadapter.cpp \
googlemapadapter.cpp \
googlesatmapadapter.cpp \
openaerialmapadapter.cpp \
fixedimageoverlay.cpp \
emptymapadapter.cpp
src/ui/JoystickWidget.cc
View file @
60e0f0ff
...
...
@@ -27,7 +27,9 @@ void JoystickWidget::updateJoystick(double roll, double pitch, double yaw, doubl
{
setX
(
roll
);
setY
(
pitch
);
setZ
(
yaw
);
setThrottle
(
thrust
);
setHat
(
xHat
,
yHat
);
}
void
JoystickWidget
::
changeEvent
(
QEvent
*
e
)
...
...
@@ -46,16 +48,29 @@ void JoystickWidget::setThrottle(float thrust)
{
m_ui
->
thrust
->
setValue
(
thrust
*
100
);
}
void
JoystickWidget
::
setX
(
float
x
)
{
m_ui
->
xSlider
->
setValue
(
x
*
100
);
m_ui
->
xValue
->
display
(
x
*
100
);
}
void
JoystickWidget
::
setY
(
float
y
)
{
m_ui
->
ySlider
->
setValue
(
y
*
100
);
m_ui
->
yValue
->
display
(
y
*
100
);
}
void
JoystickWidget
::
setZ
(
float
z
)
{
m_ui
->
dial
->
setValue
(
z
*
100
);
}
void
JoystickWidget
::
setHat
(
float
x
,
float
y
)
{
qDebug
()
<<
__FILE__
<<
__LINE__
<<
"HAT X:"
<<
x
<<
"HAT Y:"
<<
y
;
}
void
JoystickWidget
::
pressKey
(
int
key
)
{
QString
colorstyle
;
...
...
@@ -64,5 +79,5 @@ void JoystickWidget::pressKey(int key)
heartbeatColor
.
red
(),
heartbeatColor
.
green
(),
heartbeatColor
.
blue
());
m_ui
->
button0Label
->
setStyleSheet
(
colorstyle
);
m_ui
->
button0Label
->
setAutoFillBackground
(
true
);
qDebug
()
<<
"KEY"
<<
key
<<
" pressed on joystick"
;
qDebug
()
<<
__FILE__
<<
__LINE__
<<
"KEY"
<<
key
<<
" pressed on joystick"
;
}
src/ui/JoystickWidget.h
View file @
60e0f0ff
...
...
@@ -23,7 +23,7 @@ This file is part of the PIXHAWK project
/**
* @file
* @brief Definition of joystick
interface
* @brief Definition of joystick
widget
* @author Lorenz Meier <mavteam@student.ethz.ch>
*
*/
...
...
@@ -57,14 +57,23 @@ public:
* @param yHat hat vector in left-right direction, -1 left, 0 center, +1 right
*/
void
updateJoystick
(
double
roll
,
double
pitch
,
double
yaw
,
double
thrust
,
int
xHat
,
int
yHat
);
/** @brief Throttle lever */
void
setThrottle
(
float
thrust
);
/** @brief Back/forth movement */
void
setX
(
float
x
);
/** @brief Left/right movement */
void
setY
(
float
y
);
/** @brief Wrist rotation */
void
setZ
(
float
z
);
/** @brief Hat switch position */
void
setHat
(
float
x
,
float
y
);
/** @brief Joystick keys, as labeled on the joystick */
void
pressKey
(
int
key
);
protected:
/** @brief UI change event */
virtual
void
changeEvent
(
QEvent
*
e
);
JoystickInput
*
joystick
;
JoystickInput
*
joystick
;
///< Reference to the joystick
private:
Ui
::
JoystickWidget
*
m_ui
;
...
...
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