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
81d60947
Unverified
Commit
81d60947
authored
Jun 20, 2018
by
Don Gagne
Committed by
GitHub
Jun 20, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6614 from DonLakeFlyer/TerrainWarn
Warn if sending MAV_FRAME_GLOBAL_TERRAIN_ALT
parents
cbe81ce1
3b5f8ae7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
MissionController.cc
src/MissionManager/MissionController.cc
+12
-0
MissionController.h
src/MissionManager/MissionController.h
+1
-0
No files found.
src/MissionManager/MissionController.cc
View file @
81d60947
...
...
@@ -212,6 +212,17 @@ void MissionController::loadFromVehicle(void)
}
}
void
MissionController
::
_warnIfTerrainFrameUsed
(
void
)
{
for
(
int
i
=
1
;
i
<
_visualItems
->
count
();
i
++
)
{
SimpleMissionItem
*
simpleItem
=
qobject_cast
<
SimpleMissionItem
*>
(
_visualItems
->
get
(
i
));
if
(
simpleItem
&&
simpleItem
->
altitudeMode
()
==
SimpleMissionItem
::
AltitudeTerrainFrame
)
{
qgcApp
()
->
showMessage
(
tr
(
"Warning: You are using MAV_FRAME_GLOBAL_TERRAIN_ALT in a mission. %1 does not support sending terrain tiles to vehicle."
).
arg
(
qgcApp
()
->
applicationName
()));
break
;
}
}
}
void
MissionController
::
sendToVehicle
(
void
)
{
if
(
_masterController
->
offline
())
{
...
...
@@ -220,6 +231,7 @@ void MissionController::sendToVehicle(void)
qCWarning
(
MissionControllerLog
)
<<
"MissionControllerLog::sendToVehicle called while syncInProgress"
;
}
else
{
qCDebug
(
MissionControllerLog
)
<<
"MissionControllerLog::sendToVehicle"
;
_warnIfTerrainFrameUsed
();
if
(
_visualItems
->
count
()
==
1
)
{
// This prevents us from sending a possibly bogus home position to the vehicle
QmlObjectListModel
emptyModel
;
...
...
src/MissionManager/MissionController.h
View file @
81d60947
...
...
@@ -257,6 +257,7 @@ private:
void
_addCommandTimeDelay
(
SimpleMissionItem
*
simpleItem
,
bool
vtolInHover
);
void
_addTimeDistance
(
bool
vtolInHover
,
double
hoverTime
,
double
cruiseTime
,
double
extraTime
,
double
distance
,
int
seqNum
);
int
_insertComplexMissionItemWorker
(
ComplexMissionItem
*
complexItem
,
int
i
);
void
_warnIfTerrainFrameUsed
(
void
);
private:
MissionManager
*
_missionManager
;
...
...
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