SkyPulse UAV V0.1
Loading...
Searching...
No Matches
Public Types | Public Slots | Public Member Functions | Static Public Attributes | Protected Member Functions | Friends | List of all members
MPU6050 Class Reference

#include <MPU6050.h>

Inheritance diagram for MPU6050:

Public Types

using CallbackFunction = std::function<void(float[], float[], float[])>
 

Public Slots

void readAllMPU6050Reg ()
 

Public Member Functions

 MPU6050 ()
 
 MPU6050 (int customSampleRate, int calibrationTimes)
 
void getData ()
 
bool checkNewData ()
 
void setCallback (CallbackFunction callback)
 
 MPU6050 (uint8_t i2cAddress=0x68, QObject *parent=nullptr)
 
void readAllSensors (float &ax, float &ay, float &az, float &gx, float &gy, float &gz)
 
void calibrateGyro ()
 
void calibrateAccel ()
 
bool writeByte (uint8_t reg, uint8_t value)
 
bool readBytes (uint8_t reg, uint8_t *buffer, size_t length)
 

Static Public Attributes

static MPU6050globalInstance = nullptr
 

Protected Member Functions

void MPU6050ReadData (char *data)
 
void calibrateData ()
 
void GY271ReadData (char *data)
 
void setRangeOfAcce (bool needToExit)
 
void setRangeOfGyro (bool needToExit)
 

Friends

void interruptHandler (int GPIO, int level, unsigned int tick)
 

Member Typedef Documentation

◆ CallbackFunction

using MPU6050::CallbackFunction = std::function<void(float[], float[], float[])>

Constructor & Destructor Documentation

◆ MPU6050() [1/3]

MPU6050::MPU6050 ( )

◆ MPU6050() [2/3]

MPU6050::MPU6050 ( int customSampleRate,
int calibrationTimes )

◆ MPU6050() [3/3]

MPU6050::MPU6050 ( uint8_t i2cAddress = 0x68,
QObject * parent = nullptr )
explicit

Member Function Documentation

◆ calibrateAccel()

void MPU6050::calibrateAccel ( )

◆ calibrateData()

void MPU6050::calibrateData ( )
protected

◆ calibrateGyro()

void MPU6050::calibrateGyro ( )

◆ checkNewData()

bool MPU6050::checkNewData ( )

◆ getData()

void MPU6050::getData ( )

◆ GY271ReadData()

void MPU6050::GY271ReadData ( char * data)
protected

◆ MPU6050ReadData()

void MPU6050::MPU6050ReadData ( char * data)
protected

◆ readAllMPU6050Reg

void MPU6050::readAllMPU6050Reg ( )
slot

◆ readAllSensors()

void MPU6050::readAllSensors ( float & ax,
float & ay,
float & az,
float & gx,
float & gy,
float & gz )

◆ readBytes()

bool MPU6050::readBytes ( uint8_t reg,
uint8_t * buffer,
size_t length )

◆ setCallback()

void MPU6050::setCallback ( CallbackFunction callback)

◆ setRangeOfAcce()

void MPU6050::setRangeOfAcce ( bool needToExit)
protected

◆ setRangeOfGyro()

void MPU6050::setRangeOfGyro ( bool needToExit)
protected

◆ writeByte()

bool MPU6050::writeByte ( uint8_t reg,
uint8_t value )

Friends And Related Symbol Documentation

◆ interruptHandler

void interruptHandler ( int GPIO,
int level,
unsigned int tick )
friend

Member Data Documentation

◆ globalInstance

MPU6050 * MPU6050::globalInstance = nullptr
static

The documentation for this class was generated from the following files: