mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 06:43:33 +08:00
Speed reset when switching flight modes (#21414)
* speed reset between flight modes * no whitespace
This commit is contained in:
@@ -65,6 +65,9 @@ Land::on_activation()
|
|||||||
_navigator->set_can_loiter_at_sp(false);
|
_navigator->set_can_loiter_at_sp(false);
|
||||||
|
|
||||||
_navigator->set_position_setpoint_triplet_updated();
|
_navigator->set_position_setpoint_triplet_updated();
|
||||||
|
|
||||||
|
// reset cruising speed to default
|
||||||
|
_navigator->reset_cruising_speed();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
@@ -63,6 +63,9 @@ Loiter::on_activation()
|
|||||||
} else {
|
} else {
|
||||||
set_loiter_position();
|
set_loiter_position();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// reset cruising speed to default
|
||||||
|
_navigator->reset_cruising_speed();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
@@ -204,6 +204,9 @@ Mission::on_activation()
|
|||||||
cmd.param1 = -1.0f;
|
cmd.param1 = -1.0f;
|
||||||
cmd.param3 = 0.0f;
|
cmd.param3 = 0.0f;
|
||||||
_navigator->publish_vehicle_cmd(&cmd);
|
_navigator->publish_vehicle_cmd(&cmd);
|
||||||
|
|
||||||
|
// reset cruise speed
|
||||||
|
_navigator->reset_cruising_speed();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
@@ -289,7 +289,7 @@ void RTL::on_activation()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// reset cruising speed and throttle to default for RTL
|
// reset cruising speed and throttle to default for RTL
|
||||||
_navigator->set_cruising_speed();
|
_navigator->reset_cruising_speed();
|
||||||
_navigator->set_cruising_throttle();
|
_navigator->set_cruising_throttle();
|
||||||
|
|
||||||
set_rtl_item();
|
set_rtl_item();
|
||||||
|
|||||||
@@ -51,6 +51,9 @@ void
|
|||||||
Takeoff::on_activation()
|
Takeoff::on_activation()
|
||||||
{
|
{
|
||||||
set_takeoff_position();
|
set_takeoff_position();
|
||||||
|
|
||||||
|
// reset cruising speed to default
|
||||||
|
_navigator->reset_cruising_speed();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
Reference in New Issue
Block a user