Browse Source

navigator: reset cruise speed when out of mission (#5494)

This reset the cruise speed which can be set by mission items/waypoints
to set a custom speed. Once, switched out of mission, it makes sense to
use the speed set by the param again.
sbg
Julian Oes 8 years ago committed by Lorenz Meier
parent
commit
997ae98444
  1. 5
      src/modules/navigator/mission.cpp

5
src/modules/navigator/mission.cpp

@ -101,6 +101,11 @@ Mission::~Mission() @@ -101,6 +101,11 @@ Mission::~Mission()
void
Mission::on_inactive()
{
/* We need to reset the mission cruising speed, otherwise the
* mission velocity which might have been set using mission items
* is used for missions such as RTL. */
_navigator->set_cruising_speed();
/* Without home a mission can't be valid yet anyway, let's wait. */
if (!_navigator->home_position_valid()) {
return;

Loading…
Cancel
Save