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
2cd3537f
Commit
2cd3537f
authored
Jan 19, 2013
by
Lorenz Meier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated home position handling, should get waypoints right now
parent
81a1849c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
4 deletions
+11
-4
QGCMapWidget.cc
src/ui/map/QGCMapWidget.cc
+9
-2
QGCMapWidget.h
src/ui/map/QGCMapWidget.h
+2
-2
No files found.
src/ui/map/QGCMapWidget.cc
View file @
2cd3537f
...
...
@@ -15,7 +15,8 @@ QGCMapWidget::QGCMapWidget(QWidget *parent) :
trailType
(
mapcontrol
::
UAVTrailType
::
ByTimeElapsed
),
trailInterval
(
2.0
f
),
followUAVID
(
0
),
mapInitialized
(
false
)
mapInitialized
(
false
),
homeAltitude
(
0
)
{
// Widget is inactive until shown
loadSettings
(
false
);
...
...
@@ -38,6 +39,8 @@ void QGCMapWidget::showEvent(QShowEvent* event)
connect
(
UASManager
::
instance
(),
SIGNAL
(
UASCreated
(
UASInterface
*
)),
this
,
SLOT
(
addUAS
(
UASInterface
*
)),
Qt
::
UniqueConnection
);
connect
(
UASManager
::
instance
(),
SIGNAL
(
activeUASSet
(
UASInterface
*
)),
this
,
SLOT
(
activeUASSet
(
UASInterface
*
)),
Qt
::
UniqueConnection
);
connect
(
UASManager
::
instance
(),
SIGNAL
(
homePositionChanged
(
double
,
double
,
double
)),
this
,
SLOT
(
updateHomePosition
(
double
,
double
,
double
)));
foreach
(
UASInterface
*
uas
,
UASManager
::
instance
()
->
getUASList
())
{
addUAS
(
uas
);
...
...
@@ -205,6 +208,7 @@ void QGCMapWidget::activeUASSet(UASInterface* uas)
connect
(
currWPManager
,
SIGNAL
(
waypointEditableChanged
(
int
,
Waypoint
*
)),
this
,
SLOT
(
updateWaypoint
(
int
,
Waypoint
*
)));
connect
(
this
,
SIGNAL
(
waypointCreated
(
Waypoint
*
)),
currWPManager
,
SLOT
(
addWaypointEditable
(
Waypoint
*
)));
connect
(
this
,
SIGNAL
(
waypointChanged
(
Waypoint
*
)),
currWPManager
,
SLOT
(
notifyOfChangeEditable
(
Waypoint
*
)));
updateSelectedSystem
(
uas
->
getUASID
());
followUAVID
=
uas
->
getUASID
();
...
...
@@ -381,6 +385,7 @@ void QGCMapWidget::updateHomePosition(double latitude, double longitude, double
{
Home
->
SetCoord
(
internals
::
PointLatLng
(
latitude
,
longitude
));
Home
->
SetAltitude
(
altitude
);
homeAltitude
=
altitude
;
SetShowHome
(
true
);
// display the HOME position on the map
}
...
...
@@ -441,7 +446,9 @@ void QGCMapWidget::handleMapWaypointEdit(mapcontrol::WayPointItem* waypoint)
wp
->
blockSignals
(
true
);
wp
->
setLatitude
(
pos
.
Lat
());
wp
->
setLongitude
(
pos
.
Lng
());
wp
->
setAltitude
(
waypoint
->
Altitude
());
// XXX Magic values
wp
->
setAltitude
(
homeAltitude
+
50.0
f
);
wp
->
setAcceptanceRadius
(
10.0
f
);
wp
->
blockSignals
(
false
);
...
...
src/ui/map/QGCMapWidget.h
View file @
2cd3537f
...
...
@@ -149,7 +149,7 @@ protected:
float
trailInterval
;
///< Time or distance between trail items
int
followUAVID
;
///< Which UAV should be tracked?
bool
mapInitialized
;
///< Map initialized?
float
homeAltitude
;
///< Home altitude
};
...
...
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