Paparazzi UAS  v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Writes rotation to the uart bus

Module XML file: stereocam_state2camera.xml

Meant for sending the rotation to the ODROID board or to the stereo camera boards. Can be used to improve vision algorithms. The protocol that is used is the stereocommunication protocol.

Example for airframe file

This example contains all possible configuration options, not all of them are mandatory!

1 <modules>
2  <load name="stereocam_state2camera.xml">
3  <configure name="STEREO_UART" value="UARTX" />
4  <configure name="STEREO_BAUD" value="BXXXXX" />
5  </load>
6 </modules>

Module configuration options

Configure Options

  • name: STEREO_UART value: UARTX
    Description: Sets the UART port number of the connected camera (required)
  • name: STEREO_BAUD value: BXXXXX
    Description: Sets the BAUD rate of the connected camera (required: must be same as camera)

Module functions

Periodic Functions

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

  • write_serial_rot()
    • Frequency in Hz: 512.
    • Autorun: LOCK
      Periodic function automatically starts after init and can't be stopped.

Files

Header Files

The following headers are automatically included in modules.h

Source Files

Raw stereocam_state2camera.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="stereocam_state2camera" dir="stereocam">
<doc>
<description>Writes rotation to the uart bus. Meant for sending the rotation
to the ODROID board or to the stereo camera boards.
Can be used to improve vision algorithms.
The protocol that is used is the stereocommunication protocol.
</description>
<configure name="STEREO_UART" value="UARTX" description="Sets the UART port number of the connected camera (required)"/>
<configure name="STEREO_BAUD" value="BXXXXX" description="Sets the BAUD rate of the connected camera (required: must be same as camera)"/>
</doc>
<header>
<file name="state2camera/state2camera.h"/>
</header>
<periodic fun="write_serial_rot()" freq="512."/>
<makefile>
<file name="state2camera/state2camera.c"/>
<file name="stereoprotocol.c" dir="modules/stereocam"/>
<raw>
STEREO_UART_LOWER=$(shell echo $(STEREO_UART) | tr A-Z a-z)
ap.CFLAGS += -DUSE_$(STEREO_UART)
ap.CFLAGS += -DUART_LINK=$(STEREO_UART_LOWER)
ap.CFLAGS += -D$(STEREO_UART)_BAUD=$(STEREO_BAUD)
</raw>
</makefile>
</module>