Paparazzi UAS  v5.15_devel-50-g4d7045d
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
imu_swing module

Driver for IMU on the Parrot Swing drone.

  • Accelerometer/Gyroscope: MPU6000 via I2C0

Example for airframe file

Add to your firmware section:

1 <module name="imu_swing"/>

Auto-loaded modules

The following modules are automatically loaded (just as if you had added them in the airframe file)

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.

  • imu_swing_periodic()
    • Running at maximum module frequency.
    • 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 imu_swing.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="imu_swing" dir="imu">
<doc>
<description>
Driver for IMU on the Parrot Swing drone.
- Accelerometer/Gyroscope: MPU6000 via I2C0
</description>
</doc>
<autoload name="imu_common"/>
<autoload name="imu_nps"/>
<!--autoload name="sonar_bebop"/-->
<header>
<file name="imu_swing.h" dir="subsystems/imu"/>
</header>
<init fun="imu_swing_init()"/>
<periodic fun="imu_swing_periodic()"/>
<event fun="imu_swing_event()"/>
<makefile target="!sim|nps|fbw">
<define name="USE_I2C0"/>
<define name="IMU_TYPE_H" value="subsystems/imu/imu_swing.h" type="string"/>
<file name="mpu60x0.c" dir="peripherals"/>
<file name="mpu60x0_i2c.c" dir="peripherals"/>
<file name="imu_swing.c" dir="subsystems/imu"/>
</makefile>
</module>