mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-15 14:43:33 +08:00
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.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user