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

MPU6000 via SPI and HMC5883 via I2C on the PX4FMU v1.7 board

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="imu_px4fmu_v1.7">
b'<define name="PX4FMU_LOWPASS_FILTER" value="MPU60X0_DLPF_256HZ" />\n '
b'<define name="PX4FMU_SMPLRT_DIV" value="3" />\n '
b'<define name="PX4FMU_GYRO_RANGE" value="MPU60X0_GYRO_RANGE_2000" />\n '
b'<define name="PX4FMU_ACCEL_RANGE" value="MPU60X0_ACCEL_RANGE_16G" />\n '
</module>

Module configuration options

Define Options

  • name: PX4FMU_LOWPASS_FILTER value: MPU60X0_DLPF_256HZ
    Description: DigitalLowPassFilter setting of the MPU
  • name: PX4FMU_SMPLRT_DIV value: 3
    Description: sample rate divider setting of the MPU
  • name: PX4FMU_GYRO_RANGE value: MPU60X0_GYRO_RANGE_2000
    Description: gyroscope range setting of the MPU
  • name: PX4FMU_ACCEL_RANGE value: MPU60X0_ACCEL_RANGE_16G
    Description: accelerometer range setting of the MPU

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_px4fmu_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

<!DOCTYPE module SYSTEM "module.dtd">
<module name="imu_px4fmu_v1.7" dir="imu" task="sensors">
<doc>
<description>
MPU6000 via SPI and HMC5883 via I2C on the PX4FMU v1.7 board
</description>
<define name="PX4FMU_LOWPASS_FILTER" value="MPU60X0_DLPF_256HZ" description="DigitalLowPassFilter setting of the MPU"/>
<define name="PX4FMU_SMPLRT_DIV" value="3" description="sample rate divider setting of the MPU"/>
<define name="PX4FMU_GYRO_RANGE" value="MPU60X0_GYRO_RANGE_2000" description="gyroscope range setting of the MPU"/>
<define name="PX4FMU_ACCEL_RANGE" value="MPU60X0_ACCEL_RANGE_16G" description="accelerometer range setting of the MPU"/>
</doc>
<dep>
<depends>spi_master,i2c,imu_common</depends>
<provides>imu,mag</provides>
</dep>
<header>
<file name="imu_px4fmu.h"/>
</header>
<init fun="imu_px4fmu_init()"/>
<periodic fun="imu_px4fmu_periodic()"/>
<event fun="imu_px4fmu_event()"/>
<makefile target="!sim|nps|fbw">
<define name="USE_SPI1"/>
<define name="USE_SPI_SLAVE0"/>
<define name="USE_SPI_SLAVE1"/>
<define name="USE_SPI_SLAVE2"/>
<define name="USE_I2C2"/>
<file name="mpu60x0.c" dir="peripherals"/>
<file name="mpu60x0_spi.c" dir="peripherals"/>
<file name="hmc58xx.c" dir="peripherals"/>
<file name="imu_px4fmu.c"/>
<test>
<define name="SPI_MASTER"/>
<define name="USE_SPI1"/>
<define name="USE_SPI_SLAVE0"/>
<define name="USE_SPI_SLAVE1"/>
<define name="USE_SPI_SLAVE2"/>
<define name="USE_I2C2"/>
<define name="PERIODIC_FREQUENCY" value="512"/>
<define name="IMU_PX4FMU_PERIODIC_FREQ" value="512"/>
</test>
</makefile>
</module>