Paparazzi UAS  v5.12_stable-4-g9b43e9b
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
px4_gimbal module

Control gimbal camera axis through px4 from rc

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!

1 <module name="px4_gimbal">
2  <define name="PX4_GIMBAL_PWM_CHAN" value="0-5" />
3  <define name="PX4_GIMBAL_RC_CHAN" value="0-7" />
4  <define name="PX4_GIMBAL_PWM_MIN" value="0-1024" />
5  <define name="PX4_GIMBAL_PWM_MAX" value="0-1024" />
6 </module>

Module configuration options

Define Options

  • name: PX4_GIMBAL_PWM_CHAN value: 0-5
    Description: PWM channel id gimbal output (default: 0)
  • name: PX4_GIMBAL_RC_CHAN value: 0-7
    Description: Radio channel id gimbal input (default: RADIO_AUX2)
  • name: PX4_GIMBAL_PWM_MIN value: 0-1024
    Description: Minimum pwm value (default: 900)
  • name: PX4_GIMBAL_PWM_MAX value: 0-1024
    Description: Maximum pwm value (default: 1500)

Module functions

Periodic Functions

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

Files

Header Files

The following headers are automatically included in modules.h

Source Files

Raw px4_gimbal.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="px4_gimbal">
<doc>
<description>Control gimbal camera axis through px4 from rc</description>
<define name="PX4_GIMBAL_PWM_CHAN" value="0-5" description="PWM channel id gimbal output (default: 0)"/>
<define name="PX4_GIMBAL_RC_CHAN" value="0-7" description="Radio channel id gimbal input (default: RADIO_AUX2)"/>
<define name="PX4_GIMBAL_PWM_MIN" value="0-1024" description="Minimum pwm value (default: 900)"/>
<define name="PX4_GIMBAL_PWM_MAX" value="0-1024" description="Maximum pwm value (default: 1500)"/>
</doc>
<header>
<file name="px4_gimbal.h"/>
</header>
<periodic fun="px4_set_gimbal_angle_periodic()" start="px4_gimbal_init()" freq="100" autorun="TRUE"/>
<makefile>
<file name="px4_gimbal.c"/>
</makefile>
</module>