AP_HAL_PX4: UAVCAN servo removal

This commit is contained in:
Eugene Shamaev 2018-03-09 17:36:41 +02:00 committed by Andrew Tridgell
parent 1a888c16f4
commit 94f8c81d84

View File

@ -15,11 +15,6 @@
#include <AP_BoardConfig/AP_BoardConfig.h>
#if HAL_WITH_UAVCAN
#include <AP_BoardConfig/AP_BoardConfig_CAN.h>
#include <AP_UAVCAN/AP_UAVCAN.h>
#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;
}