mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-02 02:41:36 +08:00
VTOL: Pusher assist: add configuration for enabling it in LAND /disable below some altitude (#14706)
* VTOL type: add new parameter VT_FWD_TRHUST_EN for customizing pusher/tilt assist Depending on the setting of this param, the pusher assist is: -completely disabled (default) -enabled in pos, alt and auto mode (except LAND) -enabled in pos, alt and auto mode if above MPC_LAND_ALT1 -enabled in pos, alt and auto mode if above MPC_LAND_ALT2 -enabled in pos, alt and auto mode (before it was always disabled in LAND mode) -change default of VT_FWD_THRUST_SC from 0 to 0.7 Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
@@ -94,6 +94,12 @@ VtolAttitudeControl::VtolAttitudeControl() :
|
||||
_params_handles.forward_thrust_scale = param_find("VT_FWD_THRUST_SC");
|
||||
_params_handles.vt_mc_on_fmu = param_find("VT_MC_ON_FMU");
|
||||
|
||||
_params_handles.vt_forward_thrust_enable_mode = param_find("VT_FWD_THRUST_EN");
|
||||
_params_handles.mpc_land_alt1 = param_find("MPC_LAND_ALT1");
|
||||
_params_handles.mpc_land_alt2 = param_find("MPC_LAND_ALT2");
|
||||
|
||||
_params_handles.down_pitch_max = param_find("VT_DWN_PITCH_MAX");
|
||||
_params_handles.forward_thrust_scale = param_find("VT_FWD_THRUST_SC");
|
||||
/* fetch initial parameter values */
|
||||
parameters_update();
|
||||
|
||||
@@ -301,6 +307,10 @@ VtolAttitudeControl::parameters_update()
|
||||
param_get(_params_handles.vt_mc_on_fmu, &l);
|
||||
_params.vt_mc_on_fmu = l;
|
||||
|
||||
param_get(_params_handles.vt_forward_thrust_enable_mode, &_params.vt_forward_thrust_enable_mode);
|
||||
param_get(_params_handles.mpc_land_alt1, &_params.mpc_land_alt1);
|
||||
param_get(_params_handles.mpc_land_alt2, &_params.mpc_land_alt2);
|
||||
|
||||
// update the parameters of the instances of base VtolType
|
||||
if (_vtol_type != nullptr) {
|
||||
_vtol_type->parameters_update();
|
||||
|
||||
Reference in New Issue
Block a user