diff --git a/src/drivers/px4io/px4io.cpp b/src/drivers/px4io/px4io.cpp index 6850287b17..7b04516cc1 100644 --- a/src/drivers/px4io/px4io.cpp +++ b/src/drivers/px4io/px4io.cpp @@ -1023,18 +1023,11 @@ PX4IO::task_main() } } + /* Check if the IO safety circuit breaker has been updated */ int32_t safety_param_val; - param_t safety_param = param_find("CBRK_IO_SAFETY"); - - if (safety_param != PARAM_INVALID) { - - param_get(safety_param, &safety_param_val); - - if (safety_param_val == PX4IO_FORCE_SAFETY_MAGIC) { - /* disable IO safety if circuit breaker asked for it */ - (void)io_reg_set(PX4IO_PAGE_SETUP, PX4IO_P_SETUP_FORCE_SAFETY_OFF, safety_param_val); - } - } + safety_param_val = circuit_breaker_enabled("CBRK_IO_SAFETY", CBRK_IO_SAFETY_KEY); + /* 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); /* Check if the flight termination circuit breaker has been updated */ _cb_flighttermination = circuit_breaker_enabled("CBRK_FLIGHTTERM", CBRK_FLIGHTTERM_KEY);