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

Generic UART sesnsor where the data is forwarded to the GCS

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="generic_uart_sensor">
b'<define name="GENERIC_UART_ENDCHAR" value="&gt;DëFrøU
b'<define name="GENERIC_UART_MAX_SENDLEN" value="64DëFrøU
b'<define name="GENERIC_UART_MAX_BUFSIZE" value="128DëFrøU
b'<configure name="GENERIC_UART_PORT" value="UART4DëFrøU
b'<configure name="GENERIC_UART_BAUD" value="B9600" />\n '
</module>

Module configuration options

Configure Options

  • name: GENERIC_UART_PORT value: UART4
    Description: select which uart it is connected to
  • name: GENERIC_UART_BAUD value: B9600
    Description: set the baudrate of the uart

Define Options

  • name: GENERIC_UART_ENDCHAR value: >
    Description: ending character for receiving
  • name: GENERIC_UART_MAX_SENDLEN value: 64
    Description: length to start sending without waiting for the endchar (should be smaller than the buffer size)
  • name: GENERIC_UART_MAX_BUFSIZE value: 128
    Description: maxmimum buffer size

Module functions

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 generic_uart_sensor.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="generic_uart_sensor" dir="sensors">
<doc>
<description>Generic UART sesnsor where the data is forwarded to the GCS</description>
<configure name="GENERIC_UART_PORT" value="UART4" description="select which uart it is connected to"/>
<configure name="GENERIC_UART_BAUD" value="B9600" description="set the baudrate of the uart"/>
<define name="GENERIC_UART_ENDCHAR" value="&gt;" description="ending character for receivingåÖ°
<define name="GENERIC_UART_MAX_SENDLEN" value="64" description="length to start sending without waiting for the endchar (should be smaller than the buffer size)åÖ°
<define name="GENERIC_UART_MAX_BUFSIZE" value="128" description="maxmimum buffer sizeåÖ°
åÖ°uøU
åÖ°uøU
<file name="generic_uart.håÖ°
åÖ°uøU
<event fun="generic_uart_event()åÖ°
åÖ°uøU
␐­¡$×
<configure name="GENERIC_UART_PORT" default="UART4" case="upper|loweråÖ°
<configure name="GENERIC_UART_BAUD" default="B9600åÖ°
AÙÒ_␅
<define name="USE_$(GENERIC_UART_PORT_UPPER)åÖ°
<define name="USE_$(GENERIC_UART_PORT_UPPER)_TX" value="FALSEåÖ°
<define name="$(GENERIC_UART_PORT_UPPER)_BAUD" value="$(GENERIC_UART_BAUD)åÖ°
<define name="GENERIC_UART_PORT" value="$(GENERIC_UART_PORT_LOWER)åÖ°
åÖ°uøU
<file name="generic_uart.c"/>
</makefile>
</module>