diff --git a/sw/airborne/firmwares/fixedwing/main_fbw.c b/sw/airborne/firmwares/fixedwing/main_fbw.c index 0d0ec2e175..e39bb3074e 100644 --- a/sw/airborne/firmwares/fixedwing/main_fbw.c +++ b/sw/airborne/firmwares/fixedwing/main_fbw.c @@ -56,6 +56,10 @@ #include "link_mcu_usart.h" #endif +#ifdef MCU_CAN_LINK +#include "link_mcu_can.h" +#endif + uint8_t fbw_mode; #include "inter_mcu.h" @@ -130,8 +134,10 @@ void init_fbw( void ) { #ifdef INTER_MCU inter_mcu_init(); #endif -#ifdef MCU_SPI_LINK +#if defined MCU_SPI_LINK || defined MCU_CAN_LINK link_mcu_init(); +#endif +#ifdef MCU_SPI_LINK link_mcu_restart(); #endif @@ -317,6 +323,11 @@ void periodic_task_fbw( void ) { link_mcu_periodic_task(); #endif +#ifdef MCU_CAN_LINK + inter_mcu_fill_fbw_state(); + link_mcu_periodic_task(); +#endif + #if PERIODIC_TELEMETRY periodic_telemetry_send_Fbw(); #endif