Paparazzi UAS  v5.10_stable-5-g83a0da5-dirty
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
esc32 module

Driver for the ESC32v3 speed controller

Motor is controlled with PWM. Data (voltage, current, RPM) are received from the serial link.

The driver should work with v2 and v3.

TBD:

  • send commands to change ESC settings through serial link.
  • support multiple ESC

For more information see:

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="esc32">
2  <configure name="ESC32_PORT" value="UARTX" />
3 </module>

Module configuration options

Configure Options

  • name: ESC32_PORT value: UARTX
    Description: UART use to get ESC data

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.

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

Files

Header Files

The following headers are automatically included in modules.h

Source Files

Raw esc32.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="esc32">
<doc>
<description>
Driver for the ESC32v3 speed controller
Motor is controlled with PWM.
Data (voltage, current, RPM) are received from the serial link.
The driver should work with v2 and v3.
TBD:
- send commands to change ESC settings through serial link.
- support multiple ESC
For more information see:
- http://autoquad.org/esc32/
- https://github.com/svn2github/esc32
</description>
<configure name="ESC32_PORT" value="UARTX" description="UART use to get ESC data"/>
</doc>
<header>
<file name="esc32.h"/>
</header>
<init fun="esc32_init()"/>
<periodic fun="esc32_periodic()" freq="10" autorun="TRUE"/>
<event fun="esc32_event()"/>
<makefile target="ap">
<configure name="ESC32_PORT" case="upper|lower"/>
<define name="USE_$(ESC32_PORT_UPPER)"/>
<define name="ESC32_DEV" value="$(ESC32_PORT_LOWER)"/>
<define name="$(ESC32_PORT_UPPER)_BAUD" value="B230400"/>
<file name="esc32.c"/>
</makefile>
</module>