AP_HAL_LINUX: Add CAN to timer_task

This commit is contained in:
Alexey Bulatov 2017-06-01 18:18:04 +03:00 committed by Tom Pittenger
parent 606eb05c95
commit e0acbd3e53

View File

@ -25,6 +25,10 @@
#include <AP_HAL_Linux/qflight/qflight_buffer.h>
#endif
#if HAL_WITH_UAVCAN
#include "CAN.h"
#endif
using namespace Linux;
extern const AP_HAL::HAL& hal;
@ -271,6 +275,16 @@ void Scheduler::_timer_task()
_run_uarts();
RCInput::from(hal.rcin)->_timer_tick();
#endif
#if HAL_WITH_UAVCAN
#if CONFIG_HAL_BOARD == HAL_BOARD_LINUX
for (i = 0; i < MAX_NUMBER_OF_CAN_INTERFACES; i++) {
if(hal.can_mgr[i] != nullptr) {
LinuxCANDriver::from(hal.can_mgr[i])->_timer_tick();
}
}
#endif
#endif
}
void Scheduler::_run_io(void)