Paparazzi UAS  v5.15_devel-59-g8c145b7
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
extra_dl module

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|usb_serial" />
3  <configure name="EXTRA_DL_BAUD" value="B57600" />
4 </module>

Module configuration options

Configure Options

  • name: EXTRA_DL_PORT value: UARTX|UDPX|usb_serial
    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.

Periodic Functions

These functions are called periodically at the specified frequency from the module periodic loop.

  • extra_pprz_dl_periodic()
    • Frequency in Hz: TELEMETRY_FREQUENCY
    • Autorun: TRUE
      Periodic function automatically starts after init.


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">
<description>Extra datalink (PPRZ transport)</description>
<configure name="EXTRA_DL_PORT" value="UARTX|UDPX|usb_serial" description="Select port for extra datalink"/>
<configure name="EXTRA_DL_BAUD" value="B57600" description="Baudrate for extra datalink if link device is UART"/>
<file name="extra_pprz_dl.h"/>
<init fun="extra_pprz_dl_init()"/>
<periodic fun="extra_pprz_dl_periodic()" freq="TELEMETRY_FREQUENCY" autorun="TRUE"/>
The event function listens on the extra telemetry port (from the payload computer for example)
and parses the received "datalink" messages, such as MOVE_WP.
We need this function to be able to listen to the extra telemetry port
As a result all messages normally handled by the autopilot (such as MOVE_WP) are processed.
<event fun="extra_pprz_dl_event()"/>
<makefile target="ap">
<configure name="EXTRA_DL_PORT" default="uart1" case="upper|lower"/>
<define name="USE_$(EXTRA_DL_PORT_UPPER)"/>
# Check for UDP port
ifneq (,$(findstring udp,$(EXTRA_DL_PORT_LOWER)))
include $(CFG_SHARED)/udp.makefile
ifneq (,$(findstring usb_serial,$(EXTRA_DL_PORT_LOWER)))
# usb_serial telemetry chosen, add files based on architecture
ifeq ($(ARCH), lpc21)
$(TARGET).srcs += $(SRC_ARCH)/usb_ser_hw.c $(SRC_ARCH)/lpcusb/usbhw_lpc.c $(SRC_ARCH)/lpcusb/usbcontrol.c
$(TARGET).srcs += $(SRC_ARCH)/lpcusb/usbstdreq.c $(SRC_ARCH)/lpcusb/usbinit.c
ifeq ($(ARCH), stm32)
$(TARGET).srcs += $(SRC_ARCH)/usb_ser_hw.c
ifneq ($(ARCH), sim)
$(error telemetry_transparent_usb currently only implemented for the lpc21 and stm32)
endif # USB serial
endif # UDP
<file name="extra_pprz_dl.c"/>
<file name="pprz_transport.c" dir="pprzlink/src"/>