mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-12 23:01:36 +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:
@@ -53,3 +53,8 @@ bool circuit_breaker_enabled(const char *breaker, int32_t magic)
|
||||
|
||||
return (PX4_PARAM_GET_BYNAME(breaker, &val) == 0) && (val == magic);
|
||||
}
|
||||
|
||||
bool circuit_breaker_enabled_by_val(int32_t breaker_val, int32_t magic)
|
||||
{
|
||||
return (breaker_val == magic);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user