You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
515 B
37 lines
515 B
#pragma once |
|
|
|
#include <freertos/FreeRTOS.h> |
|
#include <stdint.h> |
|
#include <MPU.hpp> |
|
|
|
namespace ugv { |
|
namespace io { |
|
|
|
using mpud::float_axes_t; |
|
|
|
struct MpuData { |
|
// G's |
|
float_axes_t accel; |
|
// degrees/s |
|
float_axes_t gyro_rate; |
|
// flux density uT |
|
float_axes_t mag; |
|
}; |
|
|
|
class MPU { |
|
public: |
|
explicit MPU(); |
|
~MPU(); |
|
|
|
void Init(); |
|
|
|
void GetData(MpuData &data); |
|
|
|
private: |
|
mpud::MPU * mpu_; |
|
mpud::raw_axes_t accel_, gyro_, mag_; |
|
MpuData mpu_data_; |
|
}; |
|
|
|
} // namespace io |
|
} // namespace ugv
|
|
|