mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-27 23:43:34 +08:00
Implement MAV_CMD_DO_CHANGE_SPEED throttle
This commit is contained in:
@@ -159,6 +159,7 @@ Navigator::Navigator() :
|
||||
_param_rcloss_act(this, "RCL_ACT"),
|
||||
_param_cruising_speed_hover(this, "MPC_XY_CRUISE", false),
|
||||
_param_cruising_speed_plane(this, "FW_AIRSPD_TRIM", false),
|
||||
_param_cruising_throttle_plane(this, "FW_THR_CRUISE", false),
|
||||
_mission_cruising_speed(-1.0f)
|
||||
{
|
||||
/* Create a list of our possible navigation types */
|
||||
@@ -725,6 +726,17 @@ Navigator::get_cruising_speed()
|
||||
}
|
||||
}
|
||||
|
||||
float
|
||||
Navigator::get_cruising_throttle()
|
||||
{
|
||||
/* Return the mission-requested cruise speed, or -1 */
|
||||
if (_mission_throttle > 0.0f) {
|
||||
return _mission_throttle;
|
||||
} else {
|
||||
return _param_cruising_throttle_plane.get();
|
||||
}
|
||||
}
|
||||
|
||||
float
|
||||
Navigator::get_acceptance_radius(float mission_item_radius)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user