mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-01 11:01:36 +08:00
Parameter update - Rename variables in lib
using paramter_update.py script
This commit is contained in:
@@ -41,7 +41,7 @@ bool FlightTaskFailsafe::activate()
|
||||
bool ret = FlightTask::activate();
|
||||
_position_setpoint = _position;
|
||||
_velocity_setpoint.zero();
|
||||
_thrust_setpoint = matrix::Vector3f(0.0f, 0.0f, -MPC_THR_HOVER.get() * 0.6f);
|
||||
_thrust_setpoint = matrix::Vector3f(0.0f, 0.0f, -_param_mpc_thr_hover.get() * 0.6f);
|
||||
_yaw_setpoint = _yaw;
|
||||
_yawspeed_setpoint = 0.0f;
|
||||
return ret;
|
||||
@@ -67,7 +67,7 @@ bool FlightTaskFailsafe::update()
|
||||
|
||||
} else if (PX4_ISFINITE(_velocity(2))) {
|
||||
// land with landspeed
|
||||
_velocity_setpoint(2) = MPC_LAND_SPEED.get();
|
||||
_velocity_setpoint(2) = _param_mpc_land_speed.get();
|
||||
_position_setpoint(2) = NAN;
|
||||
_thrust_setpoint(2) = NAN;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,8 @@ public:
|
||||
|
||||
private:
|
||||
DEFINE_PARAMETERS_CUSTOM_PARENT(FlightTask,
|
||||
(ParamFloat<px4::params::MPC_LAND_SPEED>) MPC_LAND_SPEED,
|
||||
(ParamFloat<px4::params::MPC_THR_HOVER>) MPC_THR_HOVER /**< throttle value at which vehicle is at hover equilibrium */
|
||||
(ParamFloat<px4::params::MPC_LAND_SPEED>) _param_mpc_land_speed,
|
||||
(ParamFloat<px4::params::MPC_THR_HOVER>)
|
||||
_param_mpc_thr_hover /**< throttle value at which vehicle is at hover equilibrium */
|
||||
)
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user