mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-29 13:53:33 +08:00
VTOL: add parameter to set the PWM_OUTPUT_DEVICE_PATH (#14732)
The device path is needed to apply PWM limits on the motors that are not used for FW flight (switch them off). With this parameter the device path can be set to either IO or FMU, depending on whether the motors are on the IO or FMU port. Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
@@ -92,6 +92,7 @@ VtolAttitudeControl::VtolAttitudeControl() :
|
||||
|
||||
_params_handles.down_pitch_max = param_find("VT_DWN_PITCH_MAX");
|
||||
_params_handles.forward_thrust_scale = param_find("VT_FWD_THRUST_SC");
|
||||
_params_handles.vt_mc_on_fmu = param_find("VT_MC_ON_FMU");
|
||||
|
||||
/* fetch initial parameter values */
|
||||
parameters_update();
|
||||
@@ -297,6 +298,9 @@ VtolAttitudeControl::parameters_update()
|
||||
param_get(_params_handles.dec_to_pitch_ff, &_params.dec_to_pitch_ff);
|
||||
param_get(_params_handles.dec_to_pitch_i, &_params.dec_to_pitch_i);
|
||||
|
||||
param_get(_params_handles.vt_mc_on_fmu, &l);
|
||||
_params.vt_mc_on_fmu = l;
|
||||
|
||||
// update the parameters of the instances of base VtolType
|
||||
if (_vtol_type != nullptr) {
|
||||
_vtol_type->parameters_update();
|
||||
|
||||
Reference in New Issue
Block a user