diff --git a/libraries/AP_HAL_PX4/RCOutput.cpp b/libraries/AP_HAL_PX4/RCOutput.cpp index e44418f03e..610e97262b 100644 --- a/libraries/AP_HAL_PX4/RCOutput.cpp +++ b/libraries/AP_HAL_PX4/RCOutput.cpp @@ -15,11 +15,6 @@ #include -#if HAL_WITH_UAVCAN -#include -#include -#endif - extern const AP_HAL::HAL& hal; using namespace PX4; @@ -524,36 +519,6 @@ void PX4RCOutput::_send_outputs(void) } } -#if HAL_WITH_UAVCAN - if (AP_BoardConfig_CAN::get_can_num_ifaces() >= 1) - { - for (uint8_t i = 0; i < MAX_NUMBER_OF_CAN_DRIVERS; i++) { - if (hal.can_mgr[i] != nullptr) - { - AP_UAVCAN *ap_uc = hal.can_mgr[i]->get_UAVCAN(); - if (ap_uc != nullptr) - { - if (ap_uc->rc_out_sem_take()) - { - for (uint8_t j = 0; j < _max_channel; j++) - { - ap_uc->rco_write(_period[j], j); - } - - if (hal.util->safety_switch_state() != AP_HAL::Util::SAFETY_DISARMED) { - ap_uc->rco_arm_actuators(true); - } else { - ap_uc->rco_arm_actuators(false); - } - - ap_uc->rc_out_sem_give(); - } - } - } - } - } -#endif // HAL_WITH_UAVCAN - perf_end(_perf_rcout); _last_output = now; }