class IMU nucleo

Dependents:   Coupe-Robotique-FIP-Main

Fork of IMU_FIP by Robotique FIP

Imu.cpp

Committer:
quentin9696
Date:
2015-04-10
Revision:
2:3088586fe88c
Parent:
1:eb79df94d147
Child:
3:89e327e1217f

File content as of revision 2:3088586fe88c:

#include "mbed.h"
#include "x_cube_mems.h"
#include "Imu.h"
#include "x_cube_mems_i2c.h"

    Imu::Imu() {
     
        TEMPERATURE_Value_C = 0.0f;
        HUMIDITY_Value = 0.0f;
        PRESSURE_Value = 0.0f;
        MAG_Value = new AxesRaw_TypeDef();
        ACC_Value = new AxesRaw_TypeDef();
        GYR_Value = new AxesRaw_TypeDef();
        
    }
    
    float Imu::getHUM() {
        return HUMIDITY_Value; 
    }
    
    float Imu::getTEMP() {
        return TEMPERATURE_Value_C;
    }
    
    float Imu::getPRES() {
        return PRESSURE_Value;   
    }
    
    AxesRaw_TypeDef * Imu::getMAG() {
        
        return MAG_Value;
    }
    
    AxesRaw_TypeDef * Imu::getACC() {
        return ACC_Value;    
    }
    
    AxesRaw_TypeDef * Imu::getGYR() {
        return GYR_Value;   
    }