42 double x = 0,
y = 0,
z = 0;
45 if (axis == AxisType::X)
47 else if (axis == AxisType::Y)
49 else if (axis == AxisType::Z)
63 double x = 0,
y = 0,
z = 0;
66 if (axis == AxisType::X)
68 else if (axis == AxisType::Y)
70 else if (axis == AxisType::Z)
84 int16_t roll = 0, pitch = 0, yaw = 0;
87 if (axis == AxisType::Roll)
89 else if (axis == AxisType::Pitch)
91 else if (axis == AxisType::Yaw)
Handling the Lower MCU (STM32) communication.
RESULT GetIMUGyro(double &x, double &y, double &z)
RESULT GetIMUAcc(double &x, double &y, double &z)
RESULT GetIMUEuler(int16_t &roll, int16_t &pitch, int16_t &yaw)
RESULT SetIMUToZero(void)
Class for motion sensing using an IMU (Inertial Measurement Unit).
int16_t getEuler(AxisType axis)
Gets the Euler angle for a specified axis.
bool resetIMUValues(void)
Resets the IMU values to zero.
double getAccel(AxisType axis)
Gets the accelerometer value for a specified axis.
double getGyro(AxisType axis)
Gets the gyro value for a specified axis.