Extra datalink (PPRZ transport)
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!
1 <module name="extra_dl">
2 <configure name="EXTRA_DL_PORT" value="UARTX|UDPX" />
3 <configure name="EXTRA_DL_BAUD" value="B57600" />
Module configuration options
Configure Options
- name:
EXTRA_DL_PORT
value: UARTX|UDPX
Description: Select port for extra datalink
- name:
EXTRA_DL_BAUD
value: B57600
Description: Baudrate for extra datalink if link device is UART
Module functions
Init Functions
These initialization functions are called once on startup.
Event Functions
These event functions are called in each cycle of the module event loop.
Files
Header Files
The following headers are automatically included in modules.h
Source Files
Raw extra_dl.xml file:
<!DOCTYPE module SYSTEM "module.dtd">
<module name="extra_dl" dir="datalink">
<doc>
<description>Extra datalink (PPRZ transport)</description>
<configure name="EXTRA_DL_PORT" value="UARTX|UDPX" description="Select port for extra datalink"/>
<configure name="EXTRA_DL_BAUD" value="B57600" description="Baudrate for extra datalink if link device is UART"/>
</doc>
<header>
<file name="extra_pprz_dl.h"/>
</header>
<init fun="extra_pprz_dl_init()"/>
<event fun="ExtraDatalinkEvent()"/>
<makefile target="ap">
<configure name="EXTRA_DL_PORT" default="uart1" case="upper|lower"/>
<define name="EXTRA_DOWNLINK_DEVICE" value="$(EXTRA_DL_PORT_LOWER)"/>
<define name="USE_$(EXTRA_DL_PORT_UPPER)"/>
<raw>
ifneq (,$(findstring udp,$(EXTRA_DL_PORT_LOWER)))
include $(CFG_SHARED)/udp.makefile
else
EXTRA_DL_BAUD ?= B57600
$(TARGET).CFLAGS += -D$(EXTRA_DL_PORT_UPPER)_BAUD=$(EXTRA_DL_BAUD)
endif
</raw>
<file name="extra_pprz_dl.c"/>
<file name="pprz_transport.c" dir="pprzlink/src"/>
</makefile>
</module>