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:
bazooka joe
2019-09-20 11:45:20 +03:00
committed by Daniel Agar
parent c18104d48b
commit fb3a91cc4f
8 changed files with 34 additions and 18 deletions
@@ -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