#include <arpirobot/arduino/sensor/OldAdafruit9Dof.hpp>
|
void | applyDefaultState () override |
|
std::vector< uint8_t > | getCreateData () override |
|
void | handleData (const std::vector< uint8_t > &data) override |
|
void | setArduino (BaseArduinoInterface *arduino) |
|
void | setDeviceId (int deviceId) |
|
bool | sendData (const std::vector< uint8_t > &data) |
|
bool | sendData (const std::string &data) |
|
|
static std::vector< uint8_t > | stringToData (const std::string &str) |
|
bool | createDevice |
|
int | deviceId |
|
std::string | deviceName |
|
BaseArduinoInterface * | arduino = nullptr |
|
◆ OldAdafruit9Dof()
arpirobot::OldAdafruit9Dof::OldAdafruit9Dof |
( |
bool |
createDevice = true , |
|
|
int |
deviceId = -1 |
|
) |
| |
- Parameters
-
createDevice | Leave this true unless the device is hard-coded in arduino firmware |
deviceId | Set this to the hard-coded deviceId if createDevice is false |
◆ calibrate()
void arpirobot::OldAdafruit9Dof::calibrate |
( |
uint16_t |
samples | ) |
|
Calibrate the IMU. Should reduce gyro drift and accelerometer error IMU MUST BE STATIONARY DURING CALIBRATION. GRAVITATIONAL ACCELERATION MUST BE IN NEGATIVE Z DIRECTION DURING CALIBRATION.
- Parameters
-
samples | The number of samples to take during calibration. More samples may be more accurate, but will take longer. |
◆ getAccelX()
double arpirobot::OldAdafruit9Dof::getAccelX |
( |
| ) |
|
Get the X axis acceleration
- Returns
- X acceleration in m/s^2
◆ getAccelY()
double arpirobot::OldAdafruit9Dof::getAccelY |
( |
| ) |
|
Get the Y axis acceleration
- Returns
- Y acceleration in m/s^2
◆ getAccelZ()
double arpirobot::OldAdafruit9Dof::getAccelZ |
( |
| ) |
|
Get the Z axis acceleration
- Returns
- Z acceleration in m/s^2
◆ getGyroX()
double arpirobot::OldAdafruit9Dof::getGyroX |
( |
| ) |
|
Get the X rotation
- Returns
- X rotation in degrees
◆ getGyroY()
double arpirobot::OldAdafruit9Dof::getGyroY |
( |
| ) |
|
Get the Y rotation
- Returns
- Y rotation in degrees
◆ getGyroZ()
double arpirobot::OldAdafruit9Dof::getGyroZ |
( |
| ) |
|
Get the Z rotation
- Returns
- Z rotation in degrees
◆ setGyroX()
void arpirobot::OldAdafruit9Dof::setGyroX |
( |
double |
newGyroX | ) |
|
Set current X rotation to the given value
- Parameters
-
newGyroX | The new X rotation to set |
◆ setGyroY()
void arpirobot::OldAdafruit9Dof::setGyroY |
( |
double |
newGyroY | ) |
|
Set current Y rotation to the given value
- Parameters
-
newGyroY | The new Y rotation to set |
◆ setGyroZ()
void arpirobot::OldAdafruit9Dof::setGyroZ |
( |
double |
newGyroZ | ) |
|
Set current Z rotation to the given value
- Parameters
-
newGyroZ | The new Z rotation to set |
The documentation for this class was generated from the following file: