Robotique FIP / IMU_FIP_nucleo

Dependents:   Coupe-Robotique-FIP-Main

Fork of IMU_FIP by Robotique FIP

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Imu.h Source File

Imu.h

00001 #include "mbed.h"
00002 #include "x_cube_mems.h"
00003 #include "x_cube_mems_i2c.h"
00004 #include "struct_IMU.h"
00005 
00006 class Imu : public X_CUBE_MEMS {
00007     public:
00008 
00009         /* Constructor */
00010         Imu();
00011         
00012         /* public attribute */ 
00013         
00014         
00015         /* Get public method */
00016         Data_IMU * getData();
00017         
00018         /* set public method */
00019         /* Raw data */
00020         void setRawHUM();
00021         void setRawTEMP();
00022         void setRawPRES();
00023         void setRawMAG();
00024         void setRawACC();
00025         void setRawGYR();     
00026         
00027         /* other method */
00028         
00029         void refresh(int i); // 0 = Raw , 1 = with offset
00030         Data_IMU * getOffset();
00031         void setOffset();
00032         
00033     private: 
00034         
00035         /* Attribute */
00036         
00037         /* Raw value */
00038         Data_IMU rawData;
00039         
00040         /* Offset */
00041         Data_IMU offsetData;
00042 };