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
bc0f7b12
Commit
bc0f7b12
authored
May 02, 2017
by
Don Gagne
Committed by
GitHub
May 02, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5077 from DonLakeFlyer/MaxGoTo
Guided: Max goto location of 1km
parents
99c062d3
8bb1b5ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
Vehicle.cc
src/Vehicle/Vehicle.cc
+8
-0
No files found.
src/Vehicle/Vehicle.cc
View file @
bc0f7b12
...
...
@@ -2024,6 +2024,14 @@ void Vehicle::guidedModeGotoLocation(const QGeoCoordinate& gotoCoord)
qgcApp
()
->
showMessage
(
guided_mode_not_supported_by_vehicle
);
return
;
}
if
(
!
coordinate
().
isValid
())
{
return
;
}
double
maxDistance
=
1000.0
;
if
(
coordinate
().
distanceTo
(
gotoCoord
)
>
maxDistance
)
{
qgcApp
()
->
showMessage
(
QString
(
"New location is too far. Must be less than %1 %2"
).
arg
(
qRound
(
FactMetaData
::
metersToAppSettingsDistanceUnits
(
maxDistance
).
toDouble
())).
arg
(
FactMetaData
::
appSettingsDistanceUnitsString
()));
return
;
}
_firmwarePlugin
->
guidedModeGotoLocation
(
this
,
gotoCoord
);
}
...
...
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