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;40U
b'<define name="GENERIC_UART_MAX_SENDLEN" value="6440U
b'<define name="GENERIC_UART_MAX_BUFSIZE" value="12840U
b'<configure name="GENERIC_UART_PORT" value="UART440U
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 receivingmU
<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)mU
<define name="GENERIC_UART_MAX_BUFSIZE" value="128" description="maxmimum buffer sizemU
m2U
m2U
<file name="generic_uart.hmU
m2U
<event fun="generic_uart_event()mU
m2U
@LW
<configure name="GENERIC_UART_PORT" default="UART4" case="upper|lowermU
<configure name="GENERIC_UART_BAUD" default="B9600mU
\␅
<define name="USE_$(GENERIC_UART_PORT_UPPER)mU
<define name="USE_$(GENERIC_UART_PORT_UPPER)_TX" value="FALSEmU
<define name="$(GENERIC_UART_PORT_UPPER)_BAUD" value="$(GENERIC_UART_BAUD)mU
<define name="GENERIC_UART_PORT" value="$(GENERIC_UART_PORT_LOWER)mU
m2U
<file name="generic_uart.c"/>
</makefile>
</module>