Paparazzi UAS  v5.0.5_stable-7-g4b8bbb7
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Servo switch

Module XML file: servo_switch.xml

No detailed description...

Module configuration options

Define Options

  • name: SERVO_SWITCH_ON_VALUE value: pwm
    Description: servo value in usec
  • name: SERVO_SWITCH_OFF_VALUE value: pwm
    Description: servo value in usec
  • name: SERVO_SWITCH_SERVO value: nb
    Description: Id of the servo (default: SWITCH)

Module functions

Init Functions

These initialization functions are called once on startup.

Periodic Functions

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

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


Header Files

The following headers are automatically included in modules.h

Source Files

Raw servo_switch.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="servo_switch">
<description>Servo switch</description>
<define name="SERVO_SWITCH_ON_VALUE" value="pwm" description="servo value in usec"/>
<define name="SERVO_SWITCH_OFF_VALUE" value="pwm" description="servo value in usec"/>
<define name="SERVO_SWITCH_SERVO" value="nb" description="Id of the servo (default: SWITCH)"/>
<file name="servo_switch.h"/>
<init fun="servo_switch_init()"/>
<periodic fun="servo_switch_periodic()" freq="10."/>
<makefile target="ap|sim|jsbsim|nps">
<!-- these parameters should be set for that module in the airframe file unless you want the defaults
Servo value in usec
<load name="servo_switch.xml">
<define name="SERVO_SWITCH_ON_VALUE" value="2000"/>
<define name="SERVO_SWITCH_OFF_VALUE" value="1000"/>
<define name="SERVO_SWITCH_SERVO" value="SWITCH"/>
The servo will not exceed the min and max positions defined in the servo section
<file name="servo_switch.c"/>