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
777a7031
Commit
777a7031
authored
Jun 16, 2010
by
lm
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of git@pixhawk.ethz.ch:qgroundcontrol
parents
413e8f8e
0303d346
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
11 deletions
+9
-11
UAS.cc
src/uas/UAS.cc
+1
-0
UASWaypointManager.cc
src/uas/UASWaypointManager.cc
+3
-1
UASWaypointManager.h
src/uas/UASWaypointManager.h
+1
-1
WaypointList.cc
src/ui/WaypointList.cc
+4
-9
No files found.
src/uas/UAS.cc
View file @
777a7031
...
...
@@ -428,6 +428,7 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
{
mavlink_waypoint_t
wp
;
mavlink_msg_waypoint_decode
(
&
message
,
&
wp
);
qDebug
()
<<
"got waypoint ("
<<
wp
.
seq
<<
") from ID "
<<
message
.
sysid
<<
" x="
<<
wp
.
x
<<
" y="
<<
wp
.
y
<<
" z="
<<
wp
.
z
;
if
(
wp
.
target_system
==
mavlink
->
getSystemId
()
&&
wp
.
target_component
==
mavlink
->
getComponentId
())
{
waypointManager
.
handleWaypoint
(
message
.
sysid
,
message
.
compid
,
&
wp
);
...
...
src/uas/UASWaypointManager.cc
View file @
777a7031
...
...
@@ -37,7 +37,7 @@ void UASWaypointManager::handleWaypoint(quint8 systemId, quint8 compId, mavlink_
{
if
(
systemId
==
current_partner_systemid
&&
compId
==
current_partner_compid
&&
current_state
==
WP_GETLIST_GETWPS
&&
wp
->
seq
==
current_wp_id
)
{
qDebug
()
<<
"got waypoint ("
<<
wp
->
seq
<<
") from ID "
<<
systemId
;
qDebug
()
<<
"got waypoint ("
<<
wp
->
seq
<<
") from ID "
<<
systemId
<<
" x="
<<
wp
->
x
<<
" y="
<<
wp
->
y
<<
" z="
<<
wp
->
z
;
if
(
wp
->
seq
==
current_wp_id
)
{
...
...
@@ -170,6 +170,8 @@ void UASWaypointManager::sendWaypoints(const QVector<Waypoint*> &list)
cur_d
->
autocontinue
=
cur_s
->
getAutoContinue
();
cur_d
->
current
=
cur_s
->
getCurrent
();
cur_d
->
orbit
=
0.1
f
;
//FIXME
cur_d
->
type
=
1
;
//FIXME
cur_d
->
seq
=
i
;
cur_d
->
x
=
cur_s
->
getX
();
cur_d
->
y
=
cur_s
->
getY
();
...
...
src/uas/UASWaypointManager.h
View file @
777a7031
...
...
@@ -40,7 +40,7 @@ public slots:
signals:
void
waypointUpdated
(
int
,
quint16
,
double
,
double
,
double
,
double
,
bool
,
bool
);
///< Adds a waypoint to the waypoint list widget
void
updateStatusString
(
const
QString
&
);
///< updates the current status string
void
updateStatusString
(
const
QString
&
);
///< updates the current status string
private:
UAS
&
uas
;
///< Reference to the corresponding UAS
...
...
src/ui/WaypointList.cc
View file @
777a7031
...
...
@@ -160,6 +160,7 @@ void WaypointList::read()
removeWaypoint
(
waypoints
[
0
]);
}
redrawList
();
emit
requestWaypoints
();
}
...
...
@@ -189,13 +190,6 @@ void WaypointList::add()
void
WaypointList
::
addWaypoint
(
Waypoint
*
wp
)
{
if
(
waypoints
.
contains
(
wp
))
{
removeWaypoint
(
wp
);
}
waypoints
.
insert
(
wp
->
getId
(),
wp
);
if
(
!
wpViews
.
contains
(
wp
))
{
WaypointView
*
wpview
=
new
WaypointView
(
wp
,
this
);
...
...
@@ -205,7 +199,7 @@ void WaypointList::addWaypoint(Waypoint* wp)
connect
(
wpview
,
SIGNAL
(
moveUpWaypoint
(
Waypoint
*
)),
this
,
SLOT
(
moveUp
(
Waypoint
*
)));
connect
(
wpview
,
SIGNAL
(
removeWaypoint
(
Waypoint
*
)),
this
,
SLOT
(
removeWaypoint
(
Waypoint
*
)));
connect
(
wpview
,
SIGNAL
(
setCurrentWaypoint
(
Waypoint
*
)),
this
,
SLOT
(
setCurrentWaypoint
(
Waypoint
*
)));
connect
(
wpview
,
SIGNAL
(
waypointUpdated
(
Waypoint
*
)),
this
,
SIGNAL
(
waypointChanged
(
Waypoint
*
)));
//
connect(wpview, SIGNAL(waypointUpdated(Waypoint*)), this, SIGNAL(waypointChanged(Waypoint*)));
}
}
...
...
@@ -280,7 +274,8 @@ void WaypointList::moveDown(Waypoint* wp)
void
WaypointList
::
removeWaypoint
(
Waypoint
*
wp
)
{
// Delete from list
if
(
wp
!=
NULL
){
if
(
wp
!=
NULL
)
{
waypoints
.
remove
(
wp
->
getId
());
for
(
int
i
=
wp
->
getId
();
i
<
waypoints
.
size
();
i
++
)
{
...
...
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