Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: Coupe-Robotique-FIP-Main
Fork of IMU_FIP by
Imu.cpp
- Committer:
- quentin9696
- Date:
- 2015-04-09
- Revision:
- 0:528e23a13fb7
- Child:
- 1:eb79df94d147
File content as of revision 0:528e23a13fb7:
#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() { volatile AxesRaw_TypeDef* tmp = MAG_Value; return tmp; } AxesRaw_TypeDef * Imu::getACC() { return ACC_Value; } AxesRaw_TypeDef * Imu::getGYR() { return GYR_Value; }