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

Common datalink interface for telemetry, downlink and uplink

No detailed description...

Example for airframe file

Add to your firmware section:

<module name="datalink_common"/>

Module functions

Init Functions

These initialization functions are called once on startup.

Periodic Functions

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

  • telemetry_reporting_task()
    • Running at maximum module frequency.
    • Autorun: LOCK
      Periodic function automatically starts after init and can't be stopped.
  • datalink_periodic()
    • Frequency in Hz: 1
    • Autorun: LOCK
      Periodic function automatically starts after init and can't be stopped.

Datalink Functions

Whenever the specified datalink message is received, the corresponing handler function is called.

  • on message PING call datalink_parse_PING(dev, trans, buf)

Files

Header Files

The following headers are automatically included in modules.h

Source Files

Raw datalink_common.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="datalink_common" dir="datalink" task="datalink">
<doc>
<description>
Common datalink interface for telemetry, downlink and uplink
</description>
</doc>
<header>
<file name="telemetry.h"/>
<file name="datalink.h"/>
<file name="downlink.h"/>
</header>
<init fun="datalink_init()"/>
<init fun="downlink_init()"/>
<periodic fun="telemetry_reporting_task()"/>
<periodic fun="datalink_periodic()" freq="1"/>
<datalink message="PING" fun="datalink_parse_PING(dev, trans, buf)"/>
<makefile>
<define name="DOWNLINK"/>
<define name="PERIODIC_TELEMETRY"/>
<configure name="TELEMETRY_FREQUENCY" default="$(PERIODIC_FREQUENCY)"/>
<define name="TELEMETRY_FREQUENCY" value="$(TELEMETRY_FREQUENCY)"/>
<file name="downlink.c"/>
<file name="datalink.c"/>
<file name="telemetry.c"/>
<test firmware="fixedwing">
<define name="DOWNLINK_TRANSPORT" value="pprz_tp"/>
<define name="DOWNLINK_DEVICE" value="uart1"/>
<define name="USE_UART1"/>
</test>
</makefile>
<makefile target="!fbw" firmware="fixedwing">
<file name="ap_downlink.c" dir="$(SRC_FIRMWARE)"/>
<test firmware="fixedwing">
<define name="DOWNLINK_TRANSPORT" value="pprz_tp"/>
<define name="DOWNLINK_DEVICE" value="uart1"/>
<define name="USE_UART1"/>
</test>
</makefile>
<makefile firmware="fixedwing">
<file name="fbw_downlink.c" dir="$(SRC_FIRMWARE)"/>
</makefile>
<makefile firmware="rotorcraft">
<file name="rotorcraft_telemetry.c" dir="$(SRC_FIRMWARE)"/>
<test firmware="rotorcraft">
<define name="DOWNLINK_TRANSPORT" value="pprz_tp"/>
<define name="DOWNLINK_DEVICE" value="uart1"/>
<define name="USE_UART1"/>
</test>
</makefile>
<makefile firmware="rover">
<file name="rover_telemetry.c" dir="$(SRC_FIRMWARE)"/>
<test firmware="rover">
<define name="DOWNLINK_TRANSPORT" value="pprz_tp"/>
<define name="DOWNLINK_DEVICE" value="uart1"/>
<define name="USE_UART1"/>
<define name="USE_GENERATED_AUTOPILOT"/>
</test>
</makefile>
</module>