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
cc9f9d52
Commit
cc9f9d52
authored
Oct 17, 2017
by
DonLakeFlyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix MockLink MISSION_CLEAR_ALL support
parent
0a56e483
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
5 deletions
+35
-5
MockLinkMissionItemHandler.cc
src/comm/MockLinkMissionItemHandler.cc
+35
-5
No files found.
src/comm/MockLinkMissionItemHandler.cc
View file @
cc9f9d52
...
...
@@ -70,11 +70,7 @@ bool MockLinkMissionItemHandler::handleMessage(const mavlink_message_t& msg)
break
;
case
MAVLINK_MSG_ID_MISSION_CLEAR_ALL
:
// Delete all plan items
_missionItems
.
clear
();
_fenceItems
.
clear
();
_rallyItems
.
clear
();
_sendAck
(
MAV_MISSION_ACCEPTED
);
_handleMissionClearAll
(
msg
);
break
;
default:
...
...
@@ -84,6 +80,40 @@ bool MockLinkMissionItemHandler::handleMessage(const mavlink_message_t& msg)
return
true
;
}
void
MockLinkMissionItemHandler
::
_handleMissionClearAll
(
const
mavlink_message_t
&
msg
)
{
mavlink_mission_clear_all_t
clearAll
;
mavlink_msg_mission_clear_all_decode
(
&
msg
,
&
clearAll
);
Q_ASSERT
(
clearAll
.
target_system
==
_mockLink
->
vehicleId
());
_requestType
=
(
MAV_MISSION_TYPE
)
clearAll
.
mission_type
;
qCDebug
(
MockLinkMissionItemHandlerLog
)
<<
QStringLiteral
(
"_handleMissionClearAll %1"
).
arg
(
_requestType
);
switch
(
_requestType
)
{
case
MAV_MISSION_TYPE_MISSION
:
_missionItems
.
clear
();
break
;
case
MAV_MISSION_TYPE_FENCE
:
_fenceItems
.
clear
();
break
;
case
MAV_MISSION_TYPE_RALLY
:
_rallyItems
.
clear
();
break
;
case
MAV_MISSION_TYPE_ALL
:
_missionItems
.
clear
();
_fenceItems
.
clear
();
_rallyItems
.
clear
();
break
;
default:
Q_ASSERT
(
false
);
}
_sendAck
(
MAV_MISSION_ACCEPTED
);
}
void
MockLinkMissionItemHandler
::
_handleMissionRequestList
(
const
mavlink_message_t
&
msg
)
{
qCDebug
(
MockLinkMissionItemHandlerLog
)
<<
"_handleMissionRequestList read sequence"
;
...
...
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