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
2ad852b5
Commit
2ad852b5
authored
Jun 03, 2014
by
Thomas Gubler
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'upstream/master' into fgfsrate
parents
7f5d1aa5
ae7cb28a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
8 deletions
+14
-8
Waypoint.h
src/Waypoint.h
+4
-0
QGCMapWidget.cc
src/ui/map/QGCMapWidget.cc
+8
-7
Waypoint2DIcon.cc
src/ui/map/Waypoint2DIcon.cc
+2
-1
No files found.
src/Waypoint.h
View file @
2ad852b5
...
...
@@ -123,6 +123,7 @@ public:
const
QString
&
getDescription
()
const
{
return
description
;
}
/** @brief Returns true if x, y, z contain reasonable navigation data */
bool
isNavigationType
();
...
...
@@ -185,6 +186,9 @@ public slots:
bool
isReached
()
{
return
(
reachedTime
>
0
);
}
/** @brief Get the time this waypoint was reached */
quint64
getReachedTime
()
{
return
reachedTime
;
}
void
setChanged
()
{
emit
changed
(
this
);
}
signals:
/** @brief Announces a change to the waypoint data */
...
...
src/ui/map/QGCMapWidget.cc
View file @
2ad852b5
...
...
@@ -173,6 +173,7 @@ void QGCMapWidget::mouseReleaseEvent(QMouseEvent *event)
// If the mouse is released, we can't be dragging
if
(
firingWaypointChange
)
{
firingWaypointChange
->
setChanged
();
firingWaypointChange
=
NULL
;
}
}
...
...
@@ -638,13 +639,6 @@ void QGCMapWidget::handleMapWaypointEdit(mapcontrol::WayPointItem* waypoint)
if
(
!
wp
)
WPDelete
(
waypoint
);
// Protect from vicious double update cycle
if
(
firingWaypointChange
==
wp
)
{
return
;
}
// Not in cycle, block now from entering it
firingWaypointChange
=
wp
;
// Update WP values
internals
::
PointLatLng
pos
=
waypoint
->
Coord
();
...
...
@@ -661,6 +655,13 @@ void QGCMapWidget::handleMapWaypointEdit(mapcontrol::WayPointItem* waypoint)
// QString wp_str = QString::number(wp->getLatitude(), 'f', 6) + " " + QString::number(wp->getLongitude(), 'f', 6);
// qDebug() << "MAP WP COORD (WP):" << wp_str << __FILE__ << __LINE__;
// Protect from vicious double update cycle
if
(
firingWaypointChange
==
wp
)
{
return
;
}
// Not in cycle, block now from entering it
firingWaypointChange
=
wp
;
emit
waypointChanged
(
wp
);
}
...
...
src/ui/map/Waypoint2DIcon.cc
View file @
2ad852b5
...
...
@@ -303,7 +303,8 @@ void Waypoint2DIcon::paint(QPainter *painter, const QStyleOptionGraphicsItem *op
QPen
penDash
(
color
);
penDash
.
setWidth
(
1
);
//penDash.setStyle(Qt::DotLine);
const
int
loiter
=
map
->
metersToPixels
(
waypoint
->
getLoiterOrbit
(),
Coord
());
// A negative radius indicates counter-clockwise rotation, but we still want to draw it positive
const
int
loiter
=
map
->
metersToPixels
(
fabsf
(
waypoint
->
getLoiterOrbit
()),
Coord
());
if
(
loiter
>
picture
.
width
()
/
2
)
{
painter
->
setPen
(
penBlack
);
...
...
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