mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-27 21:33:34 +08:00
Allow for immediate cruise speed changes at any time during a mission.
This commit is contained in:
committed by
Lorenz Meier
parent
e0fc0a847c
commit
647fafe9bc
@@ -757,7 +757,7 @@ Navigator::get_cruising_speed()
|
||||
{
|
||||
/* there are three options: The mission-requested cruise speed, or the current hover / plane speed */
|
||||
if (_vstatus.is_rotary_wing) {
|
||||
if (_mission_cruising_speed_mc > FLT_EPSILON
|
||||
if (_mission_cruising_speed_mc > 0.0f
|
||||
&& _vstatus.nav_state == vehicle_status_s::NAVIGATION_STATE_AUTO_MISSION) {
|
||||
return _mission_cruising_speed_mc;
|
||||
|
||||
@@ -766,7 +766,7 @@ Navigator::get_cruising_speed()
|
||||
}
|
||||
|
||||
} else {
|
||||
if (_mission_cruising_speed_fw > FLT_EPSILON
|
||||
if (_mission_cruising_speed_fw > 0.0f
|
||||
&& _vstatus.nav_state == vehicle_status_s::NAVIGATION_STATE_AUTO_MISSION) {
|
||||
return _mission_cruising_speed_fw;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user