PX4 Firmware
PX4 Autopilot Software http://px4.io
df_mpu9250_wrapper.cpp File Reference

Lightweight driver to access the MPU9250 of the DriverFramework. More...

#include <px4_platform_common/px4_config.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdint.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <unistd.h>
#include <px4_platform_common/getopt.h>
#include <errno.h>
#include <lib/parameters/param.h>
#include <systemlib/err.h>
#include <perf/perf_counter.h>
#include <systemlib/mavlink_log.h>
#include <drivers/drv_hrt.h>
#include <drivers/drv_accel.h>
#include <drivers/drv_gyro.h>
#include <drivers/drv_mag.h>
#include <drivers/device/integrator.h>
#include <mathlib/math/filter/LowPassFilter2p.hpp>
#include <lib/conversion/rotation.h>
#include <uORB/topics/parameter_update.h>
#include <mpu9250/MPU9250.hpp>
#include <DevMgr.hpp>
Include dependency graph for df_mpu9250_wrapper.cpp:

Go to the source code of this file.

Classes

class  DfMpu9250Wrapper
 
struct  DfMpu9250Wrapper::accel_calibration_s
 
struct  DfMpu9250Wrapper::gyro_calibration_s
 
struct  DfMpu9250Wrapper::mag_calibration_s
 

Namespaces

 df_mpu9250_wrapper
 

Macros

#define MPU9250_ACCEL_DEFAULT_RATE   1000
 
#define MPU9250_GYRO_DEFAULT_RATE   1000
 
#define MPU9250_ACCEL_DEFAULT_DRIVER_FILTER_FREQ   30
 
#define MPU9250_GYRO_DEFAULT_DRIVER_FILTER_FREQ   30
 
#define MPU9250_PUB_RATE   280
 

Functions

__EXPORT int df_mpu9250_wrapper_main (int argc, char *argv[])
 
int df_mpu9250_wrapper::start (bool mag_enabled, enum Rotation rotation)
 
int df_mpu9250_wrapper::stop ()
 Stop the driver. More...
 
int df_mpu9250_wrapper::info ()
 Print a little info about the driver. More...
 
void df_mpu9250_wrapper::usage ()
 Prints info about the driver argument usage. More...
 

Variables

DfMpu9250Wrapperdf_mpu9250_wrapper::g_dev = nullptr
 

Detailed Description

Lightweight driver to access the MPU9250 of the DriverFramework.

Author
Julian Oes julia.nosp@m.n@oe.nosp@m.s.ch

Definition in file df_mpu9250_wrapper.cpp.

Macro Definition Documentation

◆ MPU9250_ACCEL_DEFAULT_DRIVER_FILTER_FREQ

#define MPU9250_ACCEL_DEFAULT_DRIVER_FILTER_FREQ   30

Definition at line 75 of file df_mpu9250_wrapper.cpp.

Referenced by DfMpu9250Wrapper::DfMpu9250Wrapper().

◆ MPU9250_ACCEL_DEFAULT_RATE

#define MPU9250_ACCEL_DEFAULT_RATE   1000

Definition at line 72 of file df_mpu9250_wrapper.cpp.

Referenced by DfMpu9250Wrapper::DfMpu9250Wrapper().

◆ MPU9250_GYRO_DEFAULT_DRIVER_FILTER_FREQ

#define MPU9250_GYRO_DEFAULT_DRIVER_FILTER_FREQ   30

Definition at line 76 of file df_mpu9250_wrapper.cpp.

Referenced by DfMpu9250Wrapper::DfMpu9250Wrapper().

◆ MPU9250_GYRO_DEFAULT_RATE

#define MPU9250_GYRO_DEFAULT_RATE   1000

◆ MPU9250_PUB_RATE

#define MPU9250_PUB_RATE   280

Definition at line 78 of file df_mpu9250_wrapper.cpp.

Referenced by DfMpu9250Wrapper::DfMpu9250Wrapper().

Function Documentation

◆ df_mpu9250_wrapper_main()

int df_mpu9250_wrapper_main ( int  argc,
char *  argv[] 
)

Definition at line 874 of file df_mpu9250_wrapper.cpp.

References df_mpu9250_wrapper::info(), ROTATION_NONE, df_mpu9250_wrapper::start(), df_mpu9250_wrapper::stop(), and df_mpu9250_wrapper::usage().

Here is the call graph for this function: