I plan to use UAVCAN (/can0) and a normal CANbus (/can1) in my configuration. Is this option possible in PX4?
I read somewhere in the user manual that UAVCAN must be disabled before using CAN so that there is no conflicts.
I currently use UAVCAN for GPS and airspeed sensor.
I need the CANbus to read data from the MMW radar NRA24
The question is is it possible to use the CAN1 port for UAVCAN and CAN2 for standard CANbus devices at the same time?
This question exists because of the contents of the file /boards/…/src/can.c
Where the following is stated:
#if defined(CONFIG_STM32_CAN1) && defined(CONFIG_STM32_CAN2) # warning "Both CAN1 and CAN2 are enabled. Assuming only CAN1." # undef CONFIG_STM32_CAN2 #endif #ifdef CONFIG_STM32_CAN1 # define CAN_PORT 1 #else # define CAN_PORT 2 #endif
According to these headers the program automatically deactivates one of the CAN ports and only one is used. Or am I reading it wrong?