Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
uavcan module

UAVCan interface for transmitting/receiving uavcan messages on CAN busses

No detailed description...

Example for airframe file

Add to your firmware section: This example contains all possible configuration options, not all of them are mandatory!

<module name="uavcan">
b'<define name="UAVCAN_NODE_ID" value="100" />\n '
b'<define name="UAVCAN_BAUDRATE" value="1000000" />\n '
b'<configure name="UAVCAN_USE_CAN1" value="FALSE" />\n '
b'<configure name="UAVCAN_USE_CAN2" value="FALSE" />\n '
</module>

Module configuration options

Configure Options

  • name: UAVCAN_USE_CAN1 value: FALSE
    Description: Enable UAVCAN on CAN1 interface
  • name: UAVCAN_USE_CAN2 value: FALSE
    Description: Enable UAVCAN on CAN2 interface

Define Options

  • name: UAVCAN_NODE_ID value: 100
    Description: The UAVCAN node ID of the AP
  • name: UAVCAN_BAUDRATE value: 1000000
    Description: The baudrate of the CAN interface

Module functions

Init Functions

These initialization functions are called once on startup.

Files

Header Files

The following headers are automatically included in modules.h

Source Files

Raw uavcan.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="uavcan" dir="uavcan">
<doc>
<description>
UAVCan interface for transmitting/receiving uavcan messages on CAN busses
</description>
<configure name="UAVCAN_USE_CAN1" value="FALSE" description="Enable UAVCAN on CAN1 interface"/>
<configure name="UAVCAN_USE_CAN2" value="FALSE" description="Enable UAVCAN on CAN2 interface"/>
<define name="UAVCAN_NODE_ID" value="100" description="The UAVCAN node ID of the AP"/>
<define name="UAVCAN_BAUDRATE" value="1000000" description="The baudrate of the CAN interface"/>
</doc>
<header>
<file name="uavcan.h" dir="modules/uavcan"/>
</header>
<init fun="uavcan_init()"/>
<makefile target="ap">
<!-- Enable the CAN busses if needed -->
<define name="USE_CAN1" cond="ifeq ($(UAVCAN_USE_CAN1), TRUE)"/>
<define name="USE_CAN2" cond="ifeq ($(UAVCAN_USE_CAN2), TRUE)"/>
<define name="UAVCAN_USE_CAN1" value="$(UAVCAN_USE_CAN1)"/>
<define name="UAVCAN_USE_CAN2" value="$(UAVCAN_USE_CAN2)"/>
<!-- Load canard -->
<include name="$(PAPARAZZI_SRC)/sw/ext/libcanard"/>
<file name="canard.c" dir="$(PAPARAZZI_SRC)/sw/ext/libcanard"/>
<!-- Load uavcan itself -->
<file_arch name="uavcan.c" dir="modules/uavcan"/>
</makefile>
</module>