Implement MAV_CMD_DO_CHANGE_SPEED throttle

This commit is contained in:
sander
2016-06-23 09:08:35 +02:00
committed by Roman
parent 7f8c183d99
commit 37531c018a
5 changed files with 46 additions and 1 deletions
+12
View File
@@ -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)
{