mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 19:03:33 +08:00
px4io - rename safety_param_val to circuit_breaker_io_enabled and change its type to bool since circuit_breaker_enabled returns a boolean
This commit is contained in:
@@ -1024,10 +1024,10 @@ PX4IO::task_main()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Check if the IO safety circuit breaker has been updated */
|
/* Check if the IO safety circuit breaker has been updated */
|
||||||
int32_t safety_param_val;
|
bool circuit_breaker_io_safety_enabled;
|
||||||
safety_param_val = circuit_breaker_enabled("CBRK_IO_SAFETY", CBRK_IO_SAFETY_KEY);
|
circuit_breaker_io_safety_enabled = circuit_breaker_enabled("CBRK_IO_SAFETY", CBRK_IO_SAFETY_KEY);
|
||||||
/* Bypass IO safety switch logic by setting FORCE_SAFETY_OFF */
|
/* Bypass IO safety switch logic by setting FORCE_SAFETY_OFF */
|
||||||
(void)io_reg_set(PX4IO_PAGE_SETUP, PX4IO_P_SETUP_FORCE_SAFETY_OFF, safety_param_val);
|
(void)io_reg_set(PX4IO_PAGE_SETUP, PX4IO_P_SETUP_FORCE_SAFETY_OFF, circuit_breaker_io_safety_enabled);
|
||||||
|
|
||||||
/* Check if the flight termination circuit breaker has been updated */
|
/* Check if the flight termination circuit breaker has been updated */
|
||||||
_cb_flighttermination = circuit_breaker_enabled("CBRK_FLIGHTTERM", CBRK_FLIGHTTERM_KEY);
|
_cb_flighttermination = circuit_breaker_enabled("CBRK_FLIGHTTERM", CBRK_FLIGHTTERM_KEY);
|
||||||
|
|||||||
Reference in New Issue
Block a user