|
|
|
@ -257,6 +257,18 @@ FixedwingPositionControl::vehicle_command_poll()
@@ -257,6 +257,18 @@ FixedwingPositionControl::vehicle_command_poll()
|
|
|
|
|
|
|
|
|
|
abort_landing(true); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} else if (vehicle_command.command == vehicle_command_s::VEHICLE_CMD_DO_CHANGE_SPEED |
|
|
|
|
&& (uint8_t)vehicle_command.param1 == vehicle_command_s::SPEED_TYPE_AIRSPEED && vehicle_command.param2 > 0) { |
|
|
|
|
|
|
|
|
|
if (_control_mode_current == FW_POSCTRL_MODE_AUTO) { |
|
|
|
|
_pos_sp_triplet.current.cruising_speed = vehicle_command.param2; |
|
|
|
|
|
|
|
|
|
} else if (_control_mode_current == FW_POSCTRL_MODE_MANUAL_ALTITUDE |
|
|
|
|
|| _control_mode_current == FW_POSCTRL_MODE_MANUAL_POSITION) { |
|
|
|
|
_commanded_airspeed_setpoint = vehicle_command.param2; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -399,6 +411,9 @@ FixedwingPositionControl::get_manual_airspeed_setpoint()
@@ -399,6 +411,9 @@ FixedwingPositionControl::get_manual_airspeed_setpoint()
|
|
|
|
|
(_param_fw_airspd_max.get() - _param_fw_airspd_trim.get()) * |
|
|
|
|
(_manual_control_setpoint_airspeed * 2 - 1); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} else if (PX4_ISFINITE(_commanded_airspeed_setpoint)) { |
|
|
|
|
altctrl_airspeed = _commanded_airspeed_setpoint; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return altctrl_airspeed; |
|
|
|
|