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
e72fe25a
Commit
e72fe25a
authored
Aug 30, 2013
by
Lorenz Meier
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:mavlink/qgroundcontrol into config
parents
17fc6302
3f5482ad
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
16 deletions
+40
-16
README
README
+17
-4
QGCMapToolBar.cc
src/ui/map/QGCMapToolBar.cc
+10
-1
QGCMapWidget.cc
src/ui/map/QGCMapWidget.cc
+8
-11
QGCMapWidget.h
src/ui/map/QGCMapWidget.h
+5
-0
No files found.
README
View file @
e72fe25a
...
...
@@ -15,6 +15,19 @@ Documentation
=============
For generating documentation, refer to README in the doc directory.
Notes:
=====
Please make sure to delete your build folder before re-building. Independent of which
build system you use (this is not related to Qt or your OS) the dependency checking and
cleaning is based on the current project revision. So if you change the project and not
doing a clean build before you do, incremental building can leave you with stale
object files.
For the current config branch 'qupgrade' has to be installed (subject to change):
cd qgroundcontrol
git clone https://github.com/LorenzMeier/qupgrade.git
Mac OS X
========
...
...
@@ -33,13 +46,13 @@ Install QT
2) Double click the package installer
Build QGroundControl
--------------------
Build QGroundControl
(use clang compiler - not gcc)
--------------------
-----------------
1) From the terminal go to the `groundcontrol` directory
2) Run `qmake
-spec macx-g++
`
2) Run `qmake
qgroundcontrol.pro -r -spec unsupported/macx-clang CONFIG+=x86_64
`
3) Run `make -j
8
`
3) Run `make -j
4
`
Linux
...
...
src/ui/map/QGCMapToolBar.cc
View file @
e72fe25a
...
...
@@ -60,18 +60,27 @@ void QGCMapToolBar::setMap(QGCMapWidget* map)
action
=
mapTypesMenu
.
addAction
(
tr
(
"Bing Hybrid"
),
this
,
SLOT
(
setMapType
()));
action
->
setData
(
MapType
::
BingHybrid
);
action
->
setCheckable
(
true
);
#ifdef MAP_DEFAULT_TYPE_BING
action
->
setChecked
(
true
);
#endif
mapTypesGroup
->
addAction
(
action
);
action
=
mapTypesMenu
.
addAction
(
tr
(
"Google Hybrid"
),
this
,
SLOT
(
setMapType
()));
action
->
setData
(
MapType
::
GoogleHybrid
);
action
->
setCheckable
(
true
);
#ifdef MAP_DEFAULT_TYPE_GOOGLE
action
->
setChecked
(
true
);
#endif
mapTypesGroup
->
addAction
(
action
);
action
=
mapTypesMenu
.
addAction
(
tr
(
"OpenStreetMap"
),
this
,
SLOT
(
setMapType
()));
action
->
setData
(
MapType
::
OpenStreetMap
);
action
->
setCheckable
(
true
);
#ifdef MAP_DEFAULT_TYPE_OSM
action
->
setChecked
(
true
);
#endif
mapTypesGroup
->
addAction
(
action
);
//TODO check current item
optionsMenu
.
addMenu
(
&
mapTypesMenu
);
...
...
src/ui/map/QGCMapWidget.cc
View file @
e72fe25a
...
...
@@ -34,7 +34,13 @@ QGCMapWidget::QGCMapWidget(QWidget *parent) :
//this->SetShowTileGridLines(true);
//default appears to be Google Hybrid, and is broken currently
#if defined MAP_DEFAULT_TYPE_BING
this
->
SetMapType
(
MapType
::
BingHybrid
);
#elif defined MAP_DEFAULT_TYPE_GOOGLE
this
->
SetMapType
(
MapType
::
GoogleHybrid
);
#else
this
->
SetMapType
(
MapType
::
OpenStreetMap
);
#endif
this
->
setContextMenuPolicy
(
Qt
::
ActionsContextMenu
);
...
...
@@ -75,7 +81,7 @@ void QGCMapWidget::guidedActionTriggered()
}
}
// Create new waypoint and send it to the WPManager to send out.
internals
::
PointLatLng
pos
=
map
->
FromLocalToLatLng
(
mousePressPos
.
x
(),
m
ousePressPos
.
y
());
internals
::
PointLatLng
pos
=
map
->
FromLocalToLatLng
(
contextMousePressPos
.
x
(),
contextM
ousePressPos
.
y
());
qDebug
()
<<
"Guided action requested. Lat:"
<<
pos
.
Lat
()
<<
"Lon:"
<<
pos
.
Lng
();
Waypoint
wp
;
wp
.
setLatitude
(
pos
.
Lat
());
...
...
@@ -113,7 +119,7 @@ void QGCMapWidget::cameraActionTriggered()
if
(
newmav
)
{
newmav
->
setMountConfigure
(
4
,
true
,
true
,
true
);
internals
::
PointLatLng
pos
=
map
->
FromLocalToLatLng
(
mousePressPos
.
x
(),
m
ousePressPos
.
y
());
internals
::
PointLatLng
pos
=
map
->
FromLocalToLatLng
(
contextMousePressPos
.
x
(),
contextM
ousePressPos
.
y
());
newmav
->
setMountControl
(
pos
.
Lat
(),
pos
.
Lng
(),
100
,
true
);
}
}
...
...
@@ -165,15 +171,6 @@ void QGCMapWidget::mouseReleaseEvent(QMouseEvent *event)
mapcontrol
::
OPMapWidget
::
mouseReleaseEvent
(
event
);
}
/*
void QGCMapWidget::contextMenuEvent(QContextMenuEvent *event)
{
// TODO Remove this method
qDebug() << "Context menu event triggered.";
mapcontrol::OPMapWidget::contextMenuEvent(event);
}
*/
QGCMapWidget
::~
QGCMapWidget
()
{
SetShowHome
(
false
);
// doing this appears to stop the map lib crashing on exit
...
...
src/ui/map/QGCMapWidget.h
View file @
e72fe25a
...
...
@@ -5,6 +5,11 @@
#include <QTimer>
#include "../../../libs/opmapcontrol/opmapcontrol.h"
// Choose one default map type
#define MAP_DEFAULT_TYPE_BING
//#define MAP_DEFAULT_TYPE_GOOGLE
//#define MAP_DEFAULT_TYPE_OSM
class
UASInterface
;
class
UASWaypointManager
;
class
Waypoint
;
...
...
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