diff --git a/src/lib/parameters/param_translation.cpp b/src/lib/parameters/param_translation.cpp index f709f12bf1..c8bf4c73e2 100644 --- a/src/lib/parameters/param_translation.cpp +++ b/src/lib/parameters/param_translation.cpp @@ -146,6 +146,25 @@ bool param_modify_on_import(bson_node_t node) } } + // 2022-04-11: translate VT_PTCH_MIN to VT_PITCH_MIN + { + if (strcmp("VT_PTCH_MIN", node->name) == 0) { + strcpy(node->name, "VT_PITCH_MIN"); + PX4_INFO("copying %s -> %s", "VT_PTCH_MIN", "VT_PITCH_MIN"); + return true; + } + } + + // 2022-04-11: translate VT_LND_PTCH_MIN to VT_LND_PITCH_MIN + { + if (strcmp("VT_LND_PTCH_MIN", node->name) == 0) { + strcpy(node->name, "VT_LND_PITCH_MIN"); + PX4_INFO("copying %s -> %s", "VT_LND_PTCH_MIN", "VT_LND_PITCH_MIN"); + return true; + } + } + + // 2021-10-21: translate NAV_GPSF_LT to FW_GPSF_LT and NAV_GPSF_R to FW_GPSF_R { if (strcmp("NAV_GPSF_LT", node->name) == 0) { diff --git a/src/modules/vtol_att_control/vtol_att_control_params.c b/src/modules/vtol_att_control/vtol_att_control_params.c index 961eaaca91..655524246d 100644 --- a/src/modules/vtol_att_control/vtol_att_control_params.c +++ b/src/modules/vtol_att_control/vtol_att_control_params.c @@ -359,12 +359,12 @@ PARAM_DEFINE_INT32(VT_MC_ON_FMU, 0); * @max 45.0 * @group VTOL Attitude Control */ -PARAM_DEFINE_FLOAT(VT_PTCH_MIN, -5.0f); +PARAM_DEFINE_FLOAT(VT_PITCH_MIN, -5.0f); /** * Minimum pitch angle during hover landing. * - * Overrides VT_PTCH_MIN when the vehicle is in LAND mode (hovering). + * Overrides VT_PITCH_MIN when the vehicle is in LAND mode (hovering). * During landing it can be beneficial to allow lower minimum pitch angles as it can avoid the wings * generating too much lift and preventing the vehicle from sinking at the desired rate. * @@ -372,7 +372,7 @@ PARAM_DEFINE_FLOAT(VT_PTCH_MIN, -5.0f); * @max 45.0 * @group VTOL Attitude Control */ -PARAM_DEFINE_FLOAT(VT_LND_PTCH_MIN, -5.0f); +PARAM_DEFINE_FLOAT(VT_LND_PITCH_MIN, -5.0f); /** * Spoiler setting while landing (hover) diff --git a/src/modules/vtol_att_control/vtol_type.cpp b/src/modules/vtol_att_control/vtol_type.cpp index 726d7cdc04..3d958e4867 100644 --- a/src/modules/vtol_att_control/vtol_type.cpp +++ b/src/modules/vtol_att_control/vtol_type.cpp @@ -633,12 +633,12 @@ float VtolType::pusher_assist() // normalized pusher support throttle (standard VTOL) or tilt (tiltrotor), initialize to 0 float forward_thrust = 0.0f; - float pitch_setpoint_min = math::radians(_param_vt_ptch_min.get()); + float pitch_setpoint_min = math::radians(_param_vt_pitch_min.get()); if (_attc->get_pos_sp_triplet()->current.valid && _attc->get_pos_sp_triplet()->current.type == position_setpoint_s::SETPOINT_TYPE_LAND) { pitch_setpoint_min = math::radians( - _param_vt_lnd_ptch_min.get()); // set min pitch during LAND (usually lower to generate less lift) + _param_vt_lnd_pitch_min.get()); // set min pitch during LAND (usually lower to generate less lift) } // only allow pitching down up to threshold, the rest of the desired diff --git a/src/modules/vtol_att_control/vtol_type.h b/src/modules/vtol_att_control/vtol_type.h index 0e783d9b77..b8dbd554d7 100644 --- a/src/modules/vtol_att_control/vtol_type.h +++ b/src/modules/vtol_att_control/vtol_type.h @@ -297,12 +297,12 @@ protected: (ParamFloat) _param_vt_b_dec_i, (ParamFloat) _param_vt_b_dec_mss, - (ParamFloat) _param_vt_ptch_min, + (ParamFloat) _param_vt_pitch_min, (ParamFloat) _param_vt_fwd_thrust_sc, (ParamInt) _param_vt_fwd_thrust_en, (ParamFloat) _param_mpc_land_alt1, (ParamFloat) _param_mpc_land_alt2, - (ParamFloat) _param_vt_lnd_ptch_min, + (ParamFloat) _param_vt_lnd_pitch_min, (ParamBool) _param_sys_ctrl_alloc, (ParamInt) _param_vt_idle_pwm_mc,