mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-21 23:43:34 +08:00
added circuit_breaker_enabled_by_val()
added and using circuit_breaker_enabled_by_val() where possible instead of circuit_breaker_enabled() which search for cbrk parameters by name, which is extensive process.
This commit is contained in:
@@ -265,7 +265,10 @@ private:
|
||||
_param_mpc_thr_hover, /**< throttle at which vehicle is at hover equilibrium */
|
||||
(ParamInt<px4::params::MPC_THR_CURVE>) _param_mpc_thr_curve, /**< throttle curve behavior */
|
||||
|
||||
(ParamInt<px4::params::MC_AIRMODE>) _param_mc_airmode
|
||||
(ParamInt<px4::params::MC_AIRMODE>) _param_mc_airmode,
|
||||
|
||||
(ParamInt<px4::params::CBRK_RATE_CTRL>) _param_cbrk_rate_ctrl
|
||||
|
||||
)
|
||||
|
||||
bool _is_tailsitter{false};
|
||||
|
||||
@@ -131,7 +131,7 @@ MulticopterAttitudeControl::parameters_updated()
|
||||
|
||||
_man_tilt_max = math::radians(_param_mpc_man_tilt_max.get());
|
||||
|
||||
_actuators_0_circuit_breaker_enabled = circuit_breaker_enabled("CBRK_RATE_CTRL", CBRK_RATE_CTRL_KEY);
|
||||
_actuators_0_circuit_breaker_enabled = circuit_breaker_enabled_by_val(_param_cbrk_rate_ctrl.get(), CBRK_RATE_CTRL_KEY);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user