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

Locks the wing of an ornicopter so it can glide.

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="glide_wing_lock">
b'<configure name="ADC_MOTOR_SENSOR" value="ADC_*" />\n '
b'<configure name="WING_POS_DOWN_THRESH" value="0-5000" />\n '
b'<configure name="WING_POS_LOCK_MIN_THRESH" value="0-5000" />\n '
b'<configure name="WING_POS_LOCK_MAX_THRESH" value="0-5000" />\n '
b'<configure name="WING_POS_LOCK_SWITCH" value="0-5000" />\n '
b'<configure name="WING_POS_NOMINAL_THRUST" value="0-9600" />\n '
</module>

Module configuration options

Configure Options

  • name: ADC_MOTOR_SENSOR value: ADC_*
    Description: ADC to use
  • name: WING_POS_DOWN_THRESH value: 0-5000
    Description: Threshold below of wich wing is considered down
  • name: WING_POS_LOCK_MIN_THRESH value: 0-5000
    Description: Prefered lock position of the wing
  • name: WING_POS_LOCK_MAX_THRESH value: 0-5000
    Description: Prefered lock position of the wing
  • name: WING_POS_LOCK_SWITCH value: 0-5000
    Description: RC switch to activate lock of the wing
  • name: WING_POS_NOMINAL_THRUST value: 0-9600
    Description: Nominal thrust to use just before locking

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.

  • glide_wing_lock_periodic()
    • Frequency in Hz: 10
    • 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 glide_wing_lock.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="glide_wing_lock">
<doc>
<description>Locks the wing of an ornicopter so it can glide.</description>
<configure name="ADC_MOTOR_SENSOR" value="ADC_*" description="ADC to use"/>
<configure name="WING_POS_DOWN_THRESH" value="0-5000" description="Threshold below of wich wing is considered down"/>
<configure name="WING_POS_LOCK_MIN_THRESH" value="0-5000" description="Prefered lock position of the wing"/>
<configure name="WING_POS_LOCK_MAX_THRESH" value="0-5000" description="Prefered lock position of the wing"/>
<configure name="WING_POS_LOCK_SWITCH" value="0-5000" description="RC switch to activate lock of the wing"/>
<configure name="WING_POS_NOMINAL_THRUST" value="0-9600" description="Nominal thrust to use just before locking"/>
</doc>
<header>
<file name="glide_wing_lock.h"/>
</header>
<init fun="glide_wing_lock_init()"/>
<periodic fun="glide_wing_lock_periodic()" freq="10"/>
<event fun="glide_wing_lock_event()"/>
<makefile target="ap">
<file name="glide_wing_lock.c"/>
<define name="ADC_CHANNEL_MOTORSENSOR" value="$(ADC_MOTOR_SENSOR)"/>
<define name="USE_$(ADC_MOTOR_SENSOR)"/>
</makefile>
</module>