Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
aa5f67d4
Commit
aa5f67d4
authored
Jul 14, 2011
by
lm
Browse files
Merge branch 'dev-mac' of github.com:pixhawk/qgroundcontrol into dev-mac
parents
10ad437c
33da8692
Changes
317
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
aa5f67d4
...
...
@@ -8,7 +8,6 @@ Info.plist
obj
*.log
*~
*qtc*
bin/*.exe
bin/*.txt
bin/mac
...
...
autobuild.sh
View file @
aa5f67d4
...
...
@@ -28,7 +28,7 @@ do
elif
[
$OPT
=
"grab_debian_dependencies"
]
&> /dev/null
then
echo
you chose to
install
debian dependencies
sudo
apt-get
install
cmake libqt4-dev flite1-dev libphonon-dev libopenscenegraph-dev
sudo
apt-get
install
cmake libqt4-dev flite1-dev libphonon-dev libopenscenegraph-dev
libsdl1.2-dev
exit
0
elif
[
$OPT
=
"remake"
]
&> /dev/null
...
...
deploy/mavlinkgen_installer.nsi
0 → 100644
View file @
aa5f67d4
Name "QGroundcontrol"
OutFile "qgroundcontrol-installer-win32.exe"
InstallDir $PROGRAMFILES\qgroundcontrol
Page license
Page directory
Page components
Page instfiles
UninstPage uninstConfirm
UninstPage instfiles
LicenseData ..\license.txt
Section ""
SetOutPath $INSTDIR
File ..\release\*.*
WriteUninstaller $INSTDIR\QGroundControl_uninstall.exe
SectionEnd
Section "Uninstall"
Delete $INSTDIR\QGroundControl_uninstall.exe
Delete $INSTDIR\*.*
RMDir $INSTDIR
Delete "$SMPROGRAMS\QGroundControl\*.*"
RMDir "$SMPROGRAMS\QGroundControl\"
SectionEnd
Section "create Start Menu Shortcuts"
CreateDirectory "$SMPROGRAMS\QGroundControl"
CreateShortCut "$SMPROGRAMS\QGroundControl\uninstall.lnk" "$INSTDIR\QGroundControl_uninstall.exe" "" "$INSTDIR\QGroundControl_uninstall.exe" 0
CreateShortCut "$SMPROGRAMS\QGroundControl\QGroundControl.lnk" "$INSTDIR\qgroundcontrol.exe" "" "$INSTDIR\qgroundcontrol.exe" 0
SectionEnd
\ No newline at end of file
images/earth.html
View file @
aa5f67d4
...
...
@@ -65,6 +65,10 @@ var trailPlacemarks = [];
var
trailsVisible
=
[];
var
trailColors
=
[];
var
waypoints
=
[];
var
waypointLines
=
[];
var
waypointLinePlacemarks
=
[];
var
waypointLineColors
=
[];
//var waypointLines = [];
//var trailPlacemarks[id];
var
lineStyle
;
...
...
@@ -362,6 +366,8 @@ function updateWaypoint(id, index, lat, lon, alt, action)
location
.
setAltitude
(
alt
);
waypoints
[
index
].
setGeometry
(
location
);
waypoints
[
index
].
setDescription
(
index
+
""
);
}
else
{
...
...
@@ -388,7 +394,26 @@ function updateWaypoint(id, index, lat, lon, alt, action)
// Add the placemark to Earth.
ge
.
getFeatures
().
appendChild
(
placemark
);
waypoints
[
index
]
=
placemark
;
}
}
// Add waypoint line
waypointLines
[
id
].
setExtrude
(
false
);
waypointLines
[
id
].
setAltitudeMode
(
ge
.
ALTITUDE_ABSOLUTE
);
// Add LineString points
waypointLines
[
id
].
getCoordinates
().
pushLatLngAlt
(
lat
,
lon
,
alt
);
// Create a style and set width and color of line
waypointLinePlacemarks
[
id
].
setStyleSelector
(
ge
.
createStyle
(
''
));
lineStyle
=
waypointLinePlacemarks
[
id
].
getStyleSelector
().
getLineStyle
();
lineStyle
.
setWidth
(
5
);
lineStyle
.
getColor
().
set
(
waypointLineColors
[
id
]);
// aabbggrr format
//lineStyle.getColor().set(color); // aabbggrr format
// Add the feature to Earth
//if (waypointLinesVisible[id] == true)
ge
.
getFeatures
().
replaceChild
(
waypointLinePlacemarks
[
id
],
waypointLinePlacemarks
[
id
]);
// Add connecting line
}
...
...
@@ -423,6 +448,7 @@ function createAircraft(id, type, color)
//planeColor = color;
createTrail
(
id
,
color
);
createWaypointLine
(
id
,
color
);
//console.log(color);
}
...
...
@@ -454,6 +480,32 @@ trailsVisible[id] = false;
}
function
createWaypointLine
(
id
,
color
)
{
waypointLinePlacemarks
[
id
]
=
ge
.
createPlacemark
(
''
);
// Create the placemark
// Create the LineString; set it to extend down to the ground
// and set the altitude mode
waypointLines
[
id
]
=
ge
.
createLineString
(
''
);
waypointLinePlacemarks
[
id
].
setGeometry
(
waypointLines
[
id
]);
waypointLines
[
id
].
setExtrude
(
false
);
waypointLines
[
id
].
setAltitudeMode
(
ge
.
ALTITUDE_ABSOLUTE
);
// Add LineString points
//lineString.getCoordinates().pushLatLngAlt(48.754, -121.835, 700);
// Create a style and set width and color of line
waypointLinePlacemarks
[
id
].
setStyleSelector
(
ge
.
createStyle
(
''
));
lineStyle
=
waypointLinePlacemarks
[
id
].
getStyleSelector
().
getLineStyle
();
lineStyle
.
setWidth
(
10
);
waypointLineColors
[
id
]
=
color
;
lineStyle
.
getColor
().
set
(
'
00000000
'
);
// aabbggrr format
// Add the feature to Earth
//ge.getFeatures().appendChild(trailPlacemarks[id]);
}
function
clearTrail
(
id
)
{
ge
.
getFeatures
().
removeChild
(
trailPlacemarks
[
id
]);
...
...
images/splash.png
View replaced file @
10ad437c
View file @
aa5f67d4
27.8 KB
|
W:
|
H:
25.5 KB
|
W:
|
H:
2-up
Swipe
Onion skin
lib/opmapcontrol/src/mapwidget/mapgraphicitem.h
View file @
aa5f67d4
...
...
@@ -39,9 +39,12 @@
#include
<QFont>
#include
<QObject>
#include
"waypointitem.h"
#include
"configuration.h"
//#include "uavitem.h"
namespace
mapcontrol
{
using
namespace
mapcontrol
;
class
OPMapWidget
;
/**
* @brief The main graphicsItem used on the widget, contains the map and map logic
...
...
lib/opmapcontrol/src/mapwidget/opmapwidget.h
View file @
aa5f67d4
...
...
@@ -37,6 +37,7 @@
#include
<QtOpenGL/QGLWidget>
#include
"waypointitem.h"
#include
"QtSvg/QGraphicsSvgItem"
#include
"configuration.h"
#include
"uavitem.h"
#include
"gpsitem.h"
#include
"homeitem.h"
...
...
@@ -168,7 +169,7 @@ namespace mapcontrol
* @param config pointer to configuration classed to be used
* @return
*/
OPMapWidget
(
QWidget
*
parent
=
0
,
Configuration
*
config
=
new
Configuration
);
OPMapWidget
(
QWidget
*
parent
=
0
,
mapcontrol
::
Configuration
*
config
=
new
mapcontrol
::
Configuration
()
);
~
OPMapWidget
();
/**
...
...
mavlinkgen.pro
View file @
aa5f67d4
...
...
@@ -37,12 +37,12 @@ HEADERS += src/standalone/mavlinkgen/MAVLinkGen.h \
src
/
comm
/
MAVLinkXMLParser
.
h
\
src
/
ui
/
mavlink
/
DomItem
.
h
\
src
/
ui
/
mavlink
/
DomModel
.
h
\
src
/
comm
/
MAVLinkSyntaxHighlighter
.
h
src
/
ui
/
mavlink
/
QGCMAVLinkTextEdit
.
h
SOURCES
+=
src
/
standalone
/
mavlinkgen
/
main
.
cc
\
src
/
standalone
/
mavlinkgen
/
MAVLinkGen
.
cc
\
src
/
ui
/
XMLCommProtocolWidget
.
cc
\
src
/
ui
/
mavlink
/
DomItem
.
cc
\
src
/
ui
/
mavlink
/
DomModel
.
cc
\
src
/
comm
/
MAVLinkXMLParser
.
cc
\
src
/
comm
/
MAVLinkSyntaxHighlighter
.
cc
src
/
ui
/
mavlink
/
QGCMAVLinkTextEdit
.
cc
RESOURCES
=
mavground
.
qrc
qgcvideo.pro
0 → 100644
View file @
aa5f67d4
# Video streaming application for simple UDP direct byte streaming
QT
+=
svg
network
opengl
TEMPLATE
=
app
TARGET
=
qgcvideo
BASEDIR
=
.
BUILDDIR
=
build
/
qgcvideo
LANGUAGE
=
C
++
CONFIG
+=
release
CONFIG
-=
debug
OBJECTS_DIR
=
$$
BUILDDIR
/
obj
MOC_DIR
=
$$
BUILDDIR
/
moc
UI_HEADERS_DIR
=
src
/
ui
/
generated
macx
:
DESTDIR
=
$$
BASEDIR
/
bin
/
mac
INCLUDEPATH
+=
.
\
src
\
src
/
ui
\
src
/
comm
\
include
/
ui
\
src
/
apps
/
qgcvideo
\
#
Input
HEADERS
+=
\
src
/
apps
/
qgcvideo
/
QGCVideoMainWindow
.
h
\
src
/
apps
/
qgcvideo
/
QGCVideoApp
.
h
\
src
/
apps
/
qgcvideo
/
QGCVideoWidget
.
h
SOURCES
+=
\
src
/
apps
/
qgcvideo
/
main
.
cc
\
src
/
apps
/
qgcvideo
/
QGCVideoMainWindow
.
cc
\
src
/
apps
/
qgcvideo
/
QGCVideoApp
.
cc
\
src
/
apps
/
qgcvideo
/
QGCVideoWidget
.
cc
FORMS
+=
\
src
/
apps
/
qgcvideo
/
QGCVideoMainWindow
.
ui
RESOURCES
=
mavground
.
qrc
qgroundcontrol.pri
View file @
aa5f67d4
...
...
@@ -29,7 +29,7 @@
# $$BASEDIR/lib/openjaus/libopenJaus/include
message(Qt version $$[QT_VERSION])
message(Using Qt from $QTDIR)
message(Using Qt from $
$[
QTDIR
]
)
release {
# DEFINES += QT_NO_DEBUG_OUTPUT
...
...
@@ -340,7 +340,8 @@ win32-msvc2008 {
#"C:\Program Files\Microsoft SDKs\Windows\v7.0\Include"
LIBS += -L$$BASEDIR/lib/sdl/msvc/lib \
-lSDLmain -lSDL
-lSDLmain -lSDL \
-lsetupapi
exists($$BASEDIR/lib/osg123) {
message("Building support for OSG")
...
...
@@ -403,7 +404,8 @@ win32-g++ {
#"C:\Program Files\Microsoft SDKs\Windows\v7.0\Include"
LIBS += -L$$BASEDIR/lib/sdl/win32 \
-lmingw32 -lSDLmain -lSDL -mwindows
-lmingw32 -lSDLmain -lSDL -mwindows \
-lsetupapi
CONFIG += windows
...
...
qgroundcontrol.pro
View file @
aa5f67d4
# -------------------------------------------------
#
QGroundControl
-
Micro
Air
Vehicle
Groundstation
#
Please
see
our
website
at
<
http
://
qgroundcontrol
.
org
>
#
Autho
r
:
#
Lorenz
Meier
<
mavteam
@
student
.
ethz
.
ch
>
#
(
c
)
2009
-
201
0
PIXHAWK
Team
#
This
file
is
part
of
the
mav
groundstation
project
#
Maintaine
r
:
#
Lorenz
Meier
<
lm
@
inf
.
ethz
.
ch
>
#
(
c
)
2009
-
201
1
QGroundControl
Developers
#
This
file
is
part
of
the
open
groundstation
project
#
QGroundControl
is
free
software
:
you
can
redistribute
it
and
/
or
modify
#
it
under
the
terms
of
the
GNU
General
Public
License
as
published
by
#
the
Free
Software
Foundation
,
either
version
3
of
the
License
,
or
...
...
@@ -23,18 +23,57 @@
#
Version
from
GIT
repository
is
preferred
#
include
(
"../qmapcontrol/QMapControl/QMapControl.pri"
)
#
{
#
Include
bundled
version
if
necessary
include
(
lib
/
QMapControl
/
QMapControl
.
pri
)
#
include
(
lib
/
QMapControl
/
QMapControl
.
pri
)
include
(
lib
/
nmea
/
nmea
.
pri
)
#
include
(
lib
/
opmapcontrol
/
opmapcontrol
.
pri
)
#
This
is
a
HACK
-
linking
to
openpilot
repo
for
now
#
OPMapControl
is
a
OpenPilot
-
independent
map
library
#
provided
by
the
OpenPilot
team
-
thanks
,
great
piece
#
of
open
-
source
software
!
#
(
We
're not reusing any part of the OP GCS, just the map library)
# Try to get it from OP mainline, if this fails fall back to internal copies
exists(../openpilot/ground/openpilotgcs/src/libs) {
include(../openpilot/ground/openpilotgcs/src/libs/utils/utils_external.pri)
include(../openpilot/ground/openpilotgcs/src/libs/opmapcontrol/opmapcontrol_external.pri)
DEPENDPATH += \
../openpilot/ground/openpilotgcs/src/libs/utils \
../openpilot/ground/openpilotgcs/src/libs/utils/src \
../openpilot/ground/openpilotgcs/src/libs/opmapcontrol \
../openpilot/ground/openpilotgcs/src/libs/opmapcontrol/src
INCLUDEPATH += \
../openpilot/ground/openpilotgcs/src/libs/utils \
../openpilot/ground/openpilotgcs/src/libs \
../openpilot/ground/openpilotgcs/src/libs/opmapcontrol
message("----- USING MAINLINE OPENPILOT FROM ../openpilot -----")
message("Using OpenPilot's
mapcontrol
library
from
external
folder
")
message("
------------------------------------------------------------------------
")
} else {
include(src/libs/utils/utils_external.pri)
include(src/libs/opmapcontrol/opmapcontrol_external.pri)
DEPENDPATH += \
src/libs/utils \
src/libs/utils/src \
src/libs/opmapcontrol \
src/libs/opmapcontrol/src
INCLUDEPATH += \
src/libs/utils \
src/libs \
src/libs/opmapcontrol
}
# include(lib/opmapcontrol/opmapcontrol.pri)
# message("
Including
bundled
QMapControl
version
as
FALLBACK
.
This
is
fine
on
Linux
and
MacOS
,
but
not
the
best
choice
in
Windows
")
QT += network \
opengl \
svg \
xml \
phonon \
webkit
webkit \
sql
TEMPLATE = app
TARGET = qgroundcontrol
BASEDIR = $$IN_PWD
...
...
@@ -56,7 +95,6 @@ exists(user_config.pri) {
message("
Adding
support
for
additional
MAVLink
messages
for
:
" $$MAVLINK_CONF)
message("
------------------------------------------------------------------------
")
}
INCLUDEPATH += $$BASEDIR/../mavlink/include/common
INCLUDEPATH += $$BASEDIR/../mavlink/include
INCLUDEPATH += $$BASEDIR/thirdParty/mavlink/include/common
...
...
@@ -111,26 +149,27 @@ include(qgroundcontrol.pri)
# Include QWT plotting library
include(src/lib/qwt/qwt.pri)
DEPENDPATH += . \
lib
/
QMapControl
\
lib
/
QMapControl
/
src
\
lib
/
opmapcontrol
\
lib
/
opmapcontrol
/
src
\
plugins \
thirdParty/qserialport/include \
thirdParty/qserialport/include/QtSerialPort \
thirdParty
/
qserialport
thirdParty/qserialport \
src/libs/qextserialport
INCLUDEPATH += . \
lib
/
QMapControl
\
lib
/
opmapcontrol
\
thirdParty/qserialport/include \
thirdParty/qserialport/include/QtSerialPort \
thirdParty
/
qserialport
/
src
thirdParty/qserialport/src \
src/libs/qextserialport
# Include serial port library
include
(
src
/
lib
/
qextserialport
/
qextserialport
.
pri
)
#
include(src/lib/qextserialport/qextserialport.pri)
# include qserial library
include(thirdParty/qserialport/qgroundcontrol-qserialport.pri)
# Serial port detection
macx::SOURCES += src/libs/qextserialport/qextserialenumerator_osx.cpp
linux-g++::SOURCES += src/libs/qextserialport/qextserialenumerator_unix.cpp
win32::SOURCES += src/libs/qextserialport/qextserialenumerator_win.cpp
# ../mavlink/include \
# MAVLink/include \
...
...
@@ -150,7 +189,6 @@ FORMS += src/ui/MainWindow.ui \
src/ui/ObjectDetectionView.ui \
src/ui/JoystickWidget.ui \
src/ui/DebugConsole.ui \
src
/
ui
/
MapWidget
.
ui
\
src/ui/XMLCommProtocolWidget.ui \
src/ui/HDDisplay.ui \
src/ui/MAVLinkSettingsWidget.ui \
...
...
@@ -181,8 +219,9 @@ FORMS += src/ui/MainWindow.ui \
src/ui/QGCSettingsWidget.ui \
src/ui/UASControlParameters.ui \
src/ui/mission/QGCMissionDoWidget.ui \
src
/
ui
/
mission
/
QGCMissionConditionWidget
.
ui
src/ui/mission/QGCMissionConditionWidget.ui \
src/ui/map/QGCMapTool.ui \
src/ui/map/QGCMapToolBar.ui
INCLUDEPATH += src \
src/ui \
src/ui/linechart \
...
...
@@ -198,16 +237,14 @@ INCLUDEPATH += src \
src/ui/watchdog \
src/ui/map3D \
src/ui/designer
HEADERS += src/MG.h \
src
/
Core
.
h
\
src/
QGC
Core.h \
src/uas/UASInterface.h \
src/uas/UAS.h \
src/uas/UASManager.h \
src/comm/LinkManager.h \
src/comm/LinkInterface.h \
src/comm/SerialLinkInterface.h \
src
/
comm
/
SerialInterface
.
h
\
src/comm/SerialLink.h \
src/comm/SerialSimulationLink.h \
src/comm/ProtocolInterface.h \
...
...
@@ -237,7 +274,6 @@ HEADERS += src/MG.h \
src/input/JoystickInput.h \
src/ui/JoystickWidget.h \
src/ui/DebugConsole.h \
src
/
ui
/
MapWidget
.
h
\
src/ui/XMLCommProtocolWidget.h \
src/ui/mavlink/DomItem.h \
src/ui/mavlink/DomModel.h \
...
...
@@ -264,8 +300,6 @@ HEADERS += src/MG.h \
src/ui/QGCPxImuFirmwareUpdate.h \
src/ui/QGCDataPlot2D.h \
src/ui/linechart/IncrementalPlot.h \
src
/
ui
/
map
/
Waypoint2DIcon
.
h
\
src
/
ui
/
map
/
MAV2DIcon
.
h
\
src/ui/QGCRemoteControlView.h \
src/ui/RadioCalibration/RadioCalibrationData.h \
src/ui/RadioCalibration/RadioCalibrationWindow.h \
...
...
@@ -297,13 +331,17 @@ HEADERS += src/MG.h \
src/ui/uas/UASControlParameters.h \
src/ui/mission/QGCMissionDoWidget.h \
src/ui/mission/QGCMissionConditionWidget.h \
src
/
uas
/
QGCUASParamManager
.
h
src/uas/QGCUASParamManager.h \
src/ui/map/QGCMapWidget.h \
src/ui/map/MAV2DIcon.h \
src/ui/map/Waypoint2DIcon.h \
src/ui/mavlink/QGCMAVLinkTextEdit.h \
src/ui/map/QGCMapTool.h \
src/ui/map/QGCMapToolBar.h \
src/libs/qextserialport/qextserialenumerator.h
# Google Earth is only supported on Mac OS and Windows with Visual Studio Compiler
macx
|
win32
-
msvc2008
:
{
HEADERS
+=
src
/
ui
/
map3D
/
QGCGoogleEarthView
.
h
}
macx|win32-msvc2008::HEADERS += src/ui/map3D/QGCGoogleEarthView.h
contains(DEPENDENCIES_PRESENT, osg) {
message("
Including
headers
for
OpenSceneGraph
")
...
...
@@ -335,9 +373,8 @@ contains(DEPENDENCIES_PRESENT, libfreenect) {
# Enable only if libfreenect is available
HEADERS += src/input/Freenect.h
}
SOURCES += src/main.cc \
src
/
Core
.
cc
\
src/
QGC
Core.cc \
src/uas/UASManager.cc \
src/uas/UAS.cc \
src/comm/LinkManager.cc \
...
...
@@ -368,7 +405,6 @@ SOURCES += src/main.cc \
src/input/JoystickInput.cc \
src/ui/JoystickWidget.cc \
src/ui/DebugConsole.cc \
src
/
ui
/
MapWidget
.
cc
\
src/ui/XMLCommProtocolWidget.cc \
src/ui/mavlink/DomItem.cc \
src/ui/mavlink/DomModel.cc \
...
...
@@ -395,8 +431,6 @@ SOURCES += src/main.cc \
src/ui/QGCPxImuFirmwareUpdate.cc \
src/ui/QGCDataPlot2D.cc \
src/ui/linechart/IncrementalPlot.cc \
src
/
ui
/
map
/
Waypoint2DIcon
.
cc
\
src
/
ui
/
map
/
MAV2DIcon
.
cc
\
src/ui/QGCRemoteControlView.cc \
src/ui/RadioCalibration/RadioCalibrationWindow.cc \
src/ui/RadioCalibration/AirfoilServoCalibrator.cc \
...
...
@@ -427,12 +461,14 @@ SOURCES += src/main.cc \
src/ui/uas/UASControlParameters.cpp \
src/ui/mission/QGCMissionDoWidget.cc \
src/ui/mission/QGCMissionConditionWidget.cc \
src
/
uas
/
QGCUASParamManager
.
cc
macx
|
win32
-
msvc2008
:
{
SOURCES
+=
src
/
ui
/
map3D
/
QGCGoogleEarthView
.
cc
}
src/uas/QGCUASParamManager.cc \
src/ui/map/QGCMapWidget.cc \
src/ui/map/MAV2DIcon.cc \
src/ui/map/Waypoint2DIcon.cc \
src/ui/mavlink/QGCMAVLinkTextEdit.cc \
src/ui/map/QGCMapTool.cc \
src/ui/map/QGCMapToolBar.cc
macx|win32-msvc2008::SOURCES += src/ui/map3D/QGCGoogleEarthView.cc
contains(DEPENDENCIES_PRESENT, osg) {
message("
Including
sources
for
OpenSceneGraph
")
...
...
@@ -450,9 +486,7 @@ contains(DEPENDENCIES_PRESENT, osg) {
src/ui/map3D/Texture.cc \
src/ui/map3D/Imagery.cc \
src/ui/map3D/HUDScaleGeode.cc \
src
/
ui
/
map3D
/
WaypointGroupNode
.
cc
\
src/ui/map3D/WaypointGroupNode.cc
contains(DEPENDENCIES_PRESENT, osgearth) {
message("
Including
sources
for
osgEarth
")
...
...
@@ -469,7 +503,7 @@ contains(DEPENDENCIES_PRESENT, libfreenect) {
RESOURCES += mavground.qrc
# Include RT-LAB Library
win32
:
exists
(
src
/
lib
/
opalrt
/
OpalApi
.
h
)
:
exists
(
C
:/
OPAL
-
RT
/
RT
-
LAB7
.
2.4
/
Common
/
bin
)
{
win32:exists(src/lib/opalrt/OpalApi.h):exists(C:/OPAL-RT/RT-LAB7.2.4/Common/bin) {
message("
Building
support
for
Opal
-
RT
"
)
LIBS
+=
-
LC
:/
OPAL
-
RT
/
RT
-
LAB7
.
2.4
/
Common
/
bin
\
-
lOpalApi
...
...
@@ -489,6 +523,5 @@ win32:exists(src/lib/opalrt/OpalApi.h):exists(C:/OPAL-RT/RT-LAB7.2.4/Common/bin)
FORMS
+=
src
/
ui
/
OpalLinkSettings
.
ui
DEFINES
+=
OPAL_RT
}
TRANSLATIONS
+=
es
-
MX
.
ts
\
TRANSLATIONS
+=
es
-
MX
.
ts
\
en
-
US
.
ts
src/QGC.cc
View file @
aa5f67d4
...
...
@@ -2,7 +2,7 @@
QGroundControl Open Source Ground Control Station
(c) 2009
,
201
0
QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
(c) 2009
-
201
1
QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
...
...
src/QGC.h
View file @
aa5f67d4
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009 - 2011 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QGROUNDCONTROL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
#ifndef QGC_H
#define QGC_H
...
...
src/Core.cc
→
src/
QGC
Core.cc
View file @
aa5f67d4
...
...
@@ -23,7 +23,7 @@ This file is part of the QGROUNDCONTROL project
/**
* @file
* @brief Implementation of class Core
* @brief Implementation of class
QGC
Core
*
* @author Lorenz Meier <mavteam@student.ethz.ch>
*
...
...
@@ -43,7 +43,7 @@ This file is part of the QGROUNDCONTROL project
#include
"configuration.h"
#include
"QGC.h"
#include
"Core.h"
#include
"
QGC
Core.h"
#include
"MG.h"
#include
"MainWindow.h"
#include
"GAudioOutput.h"
...
...
@@ -66,7 +66,7 @@ This file is part of the QGROUNDCONTROL project
**/
Core
::
Core
(
int
&
argc
,
char
*
argv
[])
:
QApplication
(
argc
,
argv
)
QGC
Core
::
QGC
Core
(
int
&
argc
,
char
*
argv
[])
:
QApplication
(
argc
,
argv
)
{
...
...
@@ -201,7 +201,7 @@ Core::Core(int &argc, char* argv[]) : QApplication(argc, argv)
* @brief Destructor for the groundstation. It destroys all loaded instances.
*
**/
Core
::~
Core
()
QGC
Core
::~
QGC
Core
()
{
//mainWindow->storeSettings();
mainWindow
->
hide
();
...
...
@@ -217,7 +217,7 @@ Core::~Core()
* The link manager keeps track of all communication links and provides the global
* packet queue. It is the main communication hub
**/
void
Core
::
startLinkManager
()
void
QGC
Core
::
startLinkManager
()
{
LinkManager
::
instance
();
}
...
...
@@ -226,7 +226,7 @@ void Core::startLinkManager()
* @brief Start the Unmanned Air System Manager
*
**/
void
Core
::
startUASManager
()
void
QGC
Core
::
startUASManager
()
{
// Load UAS plugins
QDir
pluginsDir
=
QDir
(
qApp
->
applicationDirPath
());
...
...
src/Core.h
→
src/
QGC
Core.h
View file @
aa5f67d4
...
...
@@ -30,8 +30,8 @@ This file is part of the PIXHAWK project
*/
#ifndef _CORE_H
_
#define _CORE_H
_
#ifndef
QGC
_CORE_H
#define
QGC
_CORE_H
#include
<QApplication>
...
...
@@ -51,13 +51,13 @@ This file is part of the PIXHAWK project
* the central management unit of the groundstation application.
*
**/
class
Core
:
public
QApplication
class
QGC
Core
:
public
QApplication
{
Q_OBJECT
public:
Core
(
int
&
argc
,
char
*
argv
[]);
~
Core
();
QGC
Core
(
int
&
argc
,
char
*
argv
[]);
~
QGC
Core
();
protected:
void
startLinkManager
();
...
...
@@ -71,7 +71,6 @@ protected:
private:
MainWindow
*
mainWindow
;
//ViconTarsusProtocol* tarsus;
};
#endif
/* _CORE_H_ */
src/Waypoint.cc
View file @
aa5f67d4
...
...
@@ -35,7 +35,7 @@ This file is part of the QGROUNDCONTROL project
#include
"Waypoint.h"
Waypoint
::
Waypoint
(
quint16
_id
,
double
_x
,
double
_y
,
double
_z
,
double
_param1
,
double
_param2
,
double
_param3
,
double
_param4
,
bool
_autocontinue
,
bool
_current
,
MAV_FRAME
_frame
,
MAV_CMD
_action
)
bool
_autocontinue
,
bool
_current
,
MAV_FRAME
_frame
,
MAV_CMD
_action
,
const
QString
&
_description
)
:
id
(
_id
),
x
(
_x
),
y
(
_y
),
...
...
@@ -48,7 +48,9 @@ Waypoint::Waypoint(quint16 _id, double _x, double _y, double _z, double _param1,
orbit
(
_param3
),
param1
(
_param1
),
param2
(
_param2
),
name
(
QString
(
"WP%1"
).
arg
(
id
,
2
,
10
,
QChar
(
'0'
)))
name
(
QString
(
"WP%1"
).
arg
(
id
,
2
,
10
,
QChar
(
'0'
))),
description
(
_description
),
reachedTime
(
0
)
{
}
...
...
@@ -70,9 +72,9 @@ void Waypoint::save(QTextStream &saveStream)
position
=
position
.
arg
(
z
,
0
,
'g'
,
18
);
QString
parameters
(
"%1
\t
%2
\t
%3
\t
%4"
);
parameters
=
parameters
.
arg
(
param1
,
0
,
'g'
,
18
).
arg
(
param2
,
0
,
'g'
,
18
).
arg
(
orbit
,
0
,
'g'
,
18
).
arg
(
yaw
,
0
,
'g'
,
18
);
// FORMAT: <INDEX> <CURRENT WP> <COORD FRAME> <COMMAND> <PARAM1> <PARAM2> <PARAM3> <PARAM4> <PARAM5/X/LONGITUDE> <PARAM6/Y/LATITUDE> <PARAM7/Z/ALTITUDE> <AUTOCONTINUE>
// FORMAT: <INDEX> <CURRENT WP> <COORD FRAME> <COMMAND> <PARAM1> <PARAM2> <PARAM3> <PARAM4> <PARAM5/X/LONGITUDE> <PARAM6/Y/LATITUDE> <PARAM7/Z/ALTITUDE> <AUTOCONTINUE>
<DESCRIPTION>
// as documented here: http://qgroundcontrol.org/waypoint_protocol
saveStream
<<
this
->
getId
()
<<
"
\t
"
<<
this
->
getCurrent
()
<<
"
\t
"
<<
this
->
getFrame
()
<<
"
\t
"
<<
this
->
getAction
()
<<
"
\t
"
<<
parameters
<<
"
\t
"
<<
position
<<
"
\t
"
<<
this
->
getAutoContinue
()
<<
"
\r\n
"
;
saveStream
<<
this
->
getId
()
<<
"
\t
"
<<
this
->
getCurrent
()
<<
"
\t
"
<<
this
->
getFrame
()
<<
"
\t
"
<<
this
->
getAction
()
<<
"
\t
"
<<
parameters
<<
"
\t
"
<<
position
<<
"
\t
"
<<
this
->
getAutoContinue
()
<<
"
\r\n
"
;
//"\t" << this->getDescription() << "\r\n";
}
bool
Waypoint
::
load
(
QTextStream
&
loadStream
)
...
...
@@ -91,6 +93,7 @@ bool Waypoint::load(QTextStream &loadStream)
this
->
y
=
wpParams
[
9
].
toDouble
();
this
->
z
=
wpParams
[
10
].
toDouble
();
this
->
autocontinue
=
(
wpParams
[
11
].
toInt
()
==
1
?
true
:
false
);
//this->description = wpParams[12];
return
true
;
}
return
false
;
...
...
@@ -106,7 +109,7 @@ void Waypoint::setId(quint16 id)
void
Waypoint
::
setX
(
double
x
)
{
if
(
this
->
x
!=
x
)
{
if
(
this
->
x
!=
x
&&
(
this
->
frame
==
MAV_FRAME_LOCAL
)
)
{
this
->
x
=
x
;
emit
changed
(
this
);
}
...
...
@@ -114,7 +117,7 @@ void Waypoint::setX(double x)
void
Waypoint
::
setY
(
double
y
)
{
if
(
this
->
y
!=
y
)
{
if
(
this
->
y
!=
y
&&
(
this
->
frame
==
MAV_FRAME_LOCAL
)
)
{
this
->
y
=
y
;
emit
changed
(
this
);
}
...
...
@@ -122,7 +125,7 @@ void Waypoint::setY(double y)
void
Waypoint
::
setZ
(
double
z
)
{
if
(
this
->
z
!=
z
)
{
if
(
this
->
z
!=
z
&&
(
this
->
frame
==
MAV_FRAME_LOCAL
)
)
{
this
->
z
=
z
;
emit
changed
(
this
);
}
...
...
@@ -130,27 +133,24 @@ void Waypoint::setZ(double z)
void
Waypoint
::
setLatitude
(
double
lat
)
{
if
(
this
->
x
!=
lat
)
{
if
(
this
->
x
!=
lat
&&
((
this
->
frame
==
MAV_FRAME_GLOBAL
)
||
(
this
->
frame
==
MAV_FRAME_GLOBAL_RELATIVE_ALT
))
)
{
this
->
x
=
lat
;
this
->
frame
=
MAV_FRAME_GLOBAL
;
emit
changed
(
this
);
}
}
void
Waypoint
::
setLongitude
(
double
lon
)
{
if
(
this
->
y
!=
lon
)
{
if
(
this
->
y
!=
lon
&&
((
this
->
frame
==
MAV_FRAME_GLOBAL
)
||
(
this
->
frame
==
MAV_FRAME_GLOBAL_RELATIVE_ALT
))
)
{
this
->
y
=
lon
;
this
->
frame
=
MAV_FRAME_GLOBAL
;
emit
changed
(
this
);
}
}
void
Waypoint
::
setAltitude
(
double
altitude
)
{
if
(
this
->
z
!=
altitude
)
{
if
(
this
->
z
!=
altitude
&&
((
this
->
frame
==
MAV_FRAME_GLOBAL
)
||
(
this
->
frame
==
MAV_FRAME_GLOBAL_RELATIVE_ALT
))
)
{
this
->
z
=
altitude
;
this
->
frame
=
MAV_FRAME_GLOBAL
;
emit
changed
(
this
);
}
}
...
...
src/Waypoint.h
View file @
aa5f67d4
...
...
@@ -37,6 +37,7 @@ This file is part of the PIXHAWK project
#include
<QString>
#include
<QTextStream>
#include
"QGCMAVLink.h"
#include
"QGC.h"
class
Waypoint
:
public
QObject
{
...
...
@@ -44,7 +45,7 @@ class Waypoint : public QObject
public:
Waypoint
(
quint16
id
=
0
,
double
x
=
0.0
,
double
y
=
0.0
,
double
z
=
0.0
,
double
param1
=
0.0
,
double
param2
=
0.0
,
double
param3
=
0.0
,
double
param4
=
0.0
,
bool
autocontinue
=
true
,
bool
current
=
false
,
MAV_FRAME
frame
=
MAV_FRAME_GLOBAL
,
MAV_CMD
action
=
MAV_CMD_NAV_WAYPOINT
);
bool
autocontinue
=
true
,
bool
current
=
false
,
MAV_FRAME
frame
=
MAV_FRAME_GLOBAL
,
MAV_CMD
action
=
MAV_CMD_NAV_WAYPOINT
,
const
QString
&
description
=
QString
(
""
)
);
~
Waypoint
();
quint16
getId
()
const
{
...
...
@@ -119,6 +120,9 @@ public:
const
QString
&
getName
()
const
{
return
name
;
}
const
QString
&
getDescription
()
const
{
return
description
;
}
/** @brief Returns true if x, y, z contain reasonable navigation data */
bool
isNavigationType
();
...
...
@@ -141,6 +145,8 @@ protected:
double
param2
;
int
turns
;
QString
name
;
QString
description
;
quint64
reachedTime
;
public
slots
:
void
setId
(
quint16
id
);
...
...
@@ -173,6 +179,12 @@ public slots:
void
setHoldTime
(
double
holdTime
);
/** @brief Number of turns for loiter waypoints */
void
setTurns
(
int
turns
);
/** @brief Set waypoint as reached */
void
setReached
()
{
reachedTime
=
QGC
::
groundTimeMilliseconds
();
}
/** @brief Wether this waypoint has been reached yet */
bool
isReached
()
{
return
(
reachedTime
>
0
);
}
/** @brief Get the time this waypoint was reached */
quint64
getReachedTime
()
{
return
reachedTime
;
}
signals:
/** @brief Announces a change to the waypoint data */
...
...
src/apps/qgcvideo/QGCVideoApp.cc
0 → 100644
View file @
aa5f67d4
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009 - 2011 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QGROUNDCONTROL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
/**
* @file
* @brief Implementation of main application class
*
* @author Lorenz Meier <lm@inf.ethz.ch>
*
*/
#include
<QFile>
#include
<QFlags>
#include
<QThread>
#include
<QSplashScreen>
#include
<QPixmap>
#include
<QDesktopWidget>
#include
<QPainter>
#include
<QStyleFactory>
#include
<QAction>
#include
<QSettings>
#include
<QFontDatabase>
#include
<QMainWindow>
#include
"QGCVideoApp.h"
/**
* @brief Constructor for the main application.
*
* This constructor initializes and starts the whole application. It takes standard
* command-line parameters
*
* @param argc The number of command-line parameters
* @param argv The string array of parameters
**/
QGCVideoApp
::
QGCVideoApp
(
int
&
argc
,
char
*
argv
[])
:
QApplication
(
argc
,
argv
)
{
this
->
setApplicationName
(
"QGC Video Streamer"
);
this
->
setApplicationVersion
(
"v. 1.0.0 (Beta)"
);
this
->
setOrganizationName
(
QLatin1String
(
"QGroundControl"
));
this
->
setOrganizationDomain
(
"http://qgroundcontrol.org"
);
QSettings
::
setDefaultFormat
(
QSettings
::
IniFormat
);
// Exit main application when last window is closed
connect
(
this
,
SIGNAL
(
lastWindowClosed
()),
this
,
SLOT
(
quit
()));
// Set application font
QFontDatabase
fontDatabase
=
QFontDatabase
();
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"
;
if
(
!
QFile
::
exists
(
fontFileName
))
printf
(
"ERROR! font file: %s DOES NOT EXIST!
\n
"
,
fontFileName
.
toStdString
().
c_str
());
fontDatabase
.
addApplicationFont
(
fontFileName
);
setFont
(
fontDatabase
.
font
(
fontFamilyName
,
"Roman"
,
12
));
// Create main window
QMainWindow
*
window
=
new
QMainWindow
();
//window->setCentralWidget(new XMLCommProtocolWidget(window));
window
->
setWindowTitle
(
applicationName
()
+
" "
+
applicationVersion
());
window
->
show
();
}
/**
* @brief Destructor for the groundstation. It destroys all loaded instances.
*
**/
QGCVideoApp
::~
QGCVideoApp
()
{
}
src/apps/qgcvideo/QGCVideoApp.h
0 → 100644
View file @
aa5f67d4
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009 - 2011 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QGROUNDCONTROL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
/**
* @file
* @brief Definition of main application class
*
* @author Lorenz Meier <lm@inf.ethz.ch>
*
*/
#ifndef QGCVIDEOAPP_H
#define QGCVIDEOAPP_H
#include
<QApplication>
/**
* @brief The main application and management class.
*
* This class is started by the main method and provides
* the central management unit of the groundstation application.
*
**/
class
QGCVideoApp
:
public
QApplication
{
Q_OBJECT
public:
QGCVideoApp
(
int
&
argc
,
char
*
argv
[]);
~
QGCVideoApp
();
protected:
private:
};
#endif
/* QGCVIDEOAPP_H */
src/apps/qgcvideo/QGCVideoMainWindow.cc
0 → 100644
View file @
aa5f67d4
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009 - 2011 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QGROUNDCONTROL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
/**
* @file
* @brief Implementation of main window
*
* @author Dominik Honegger
*
*/
#include
"QGCVideoMainWindow.h"
#include
"ui_QGCVideoMainWindow.h"
QGCVideoMainWindow
::
QGCVideoMainWindow
(
QWidget
*
parent
)
:
QMainWindow
(
parent
),
ui
(
new
Ui
::
QGCVideoMainWindow
)
{
ui
->
setupUi
(
this
);
}
QGCVideoMainWindow
::~
QGCVideoMainWindow
()
{
delete
ui
;
}
Prev
1
2
3
4
5
…
16
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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