Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
8bb1b5ed
Commit
8bb1b5ed
authored
May 02, 2017
by
DonLakeFlyer
Browse files
Max goto location of 1km
parent
6e57a50a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Vehicle/Vehicle.cc
View file @
8bb1b5ed
...
...
@@ -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
Supports
Markdown
0%
Try again
or
attach a new 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