mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-25 01:13:38 +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:
@@ -89,7 +89,7 @@ void MixingOutput::updateParams()
|
||||
{
|
||||
ModuleParams::updateParams();
|
||||
|
||||
bool safety_disabled = circuit_breaker_enabled("CBRK_IO_SAFETY", CBRK_IO_SAFETY_KEY);
|
||||
bool safety_disabled = circuit_breaker_enabled_by_val(_param_cbrk_io_safety.get(), CBRK_IO_SAFETY_KEY);
|
||||
|
||||
if (safety_disabled) {
|
||||
_safety_off = true;
|
||||
|
||||
@@ -234,7 +234,9 @@ private:
|
||||
(ParamInt<px4::params::MC_AIRMODE>) _param_mc_airmode, ///< multicopter air-mode
|
||||
(ParamFloat<px4::params::MOT_SLEW_MAX>) _param_mot_slew_max,
|
||||
(ParamFloat<px4::params::THR_MDL_FAC>) _param_thr_mdl_fac, ///< thrust to pwm modelling factor
|
||||
(ParamInt<px4::params::MOT_ORDERING>) _param_mot_ordering
|
||||
(ParamInt<px4::params::MOT_ORDERING>) _param_mot_ordering,
|
||||
(ParamInt<px4::params::CBRK_IO_SAFETY>) _param_cbrk_io_safety
|
||||
|
||||
)
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user