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

Servo tester

Has a setting to change the input to the servo in millisecond units.

You have to give the servo you want to test the name SERVO_TEST, and don't use it in the command laws.

Additionally, you can make the servo do a series of step maneuvers, with increasing amplitude. Tip: Open up the servo and measure the voltage on the potmeter with a high speed recorder device (like a saleae Logic analyzer with analog inputs). This will let you model the response of the servo.

If you set the boolean "is_servo" to False, the programm will NOT use negative deflections.

Example for airframe file

Add to your firmware section: This example contains all possible configuration options, not all of them are mandatory!

<module name="servo_tester">
b'<define name="TIME_PER_DEFLECTION" value="0.8" />\n '
</module>

Module configuration options

Define Options

  • name: TIME_PER_DEFLECTION value: 0.8
    Description: Time between servo steps for the 'servo_run' feature

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_tester_periodic()
    • 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 servo_tester.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="servo_tester" dir="servo_tester">
<doc>
<description>
Servo tester
Has a setting to change the input to the servo in millisecond units.
You have to give the servo you want to test the name SERVO_TEST, and don␎t 4U
}rb4U
␖~7U
u␖_␅
␖~7U
Э!m
␎t
␖~7U
␎t 4U
<define name="TIME_PER_DEFLECTION" value="0.8" description="Time between servo steps for the 'servo_run' feature␎t
␎t 4U
␎t 4U
<dl_settings NAME="Servo test␎t
<dl_settings NAME="Servo tester␎t
<dl_setting var="servo_test_val" min="1000" step="1" max="2000" module="modules/servo_tester/servo_tester" shortname="servo_input␎t
<dl_setting var="is_servo" min="0" step="1" max="1" module="modules/servo_tester/servo_tester" values="False|True" shortname="is_servo␎t
<dl_setting var="do_servo_run" min="0" step="1" max="1" module="modules/servo_tester/servo_tester" values="Off|On" shortname="servo_run␎t
␎t 4U
␎t 4U
␎t 4U
␎t 4U
<file name="servo_tester.h␎t
␎t 4U
<init fun="servo_tester_init()␎t
<periodic fun="servo_tester_periodic()" freq="512␎t
␎t 4U
<file name="servo_tester.c"/>
</makefile>
</module>