|
Files | |
file | microinfinity-cruizcore.h |
MicroInfinity CruizCore XG1300L driver. | |
Defines | |
#define | MICC_I2C_ADDR 0x02 |
#define | MICC_ACC_ANG 0x42 |
#define | MICC_TURN_RATE 0x44 |
#define | MICC_X_ACCEL 0x46 |
#define | MICC_Y_ACCEL 0x48 |
#define | MICC_Z_ACCEL 0x4A |
#define | MICC_CMD_RESET 0x60 |
#define | MICC_CMD_RANGE_2G 0x61 |
#define | MICC_CMD_RANGE_4G 0x62 |
#define | MICC_CMD_RANGE_8G 0x63 |
#define | MICCsetRange2G(x) MICCsendCmd(x, MICC_CMD_RANGE_2G) |
#define | MICCsetRange4G(x) MICCsendCmd(x, MICC_CMD_RANGE_4G) |
#define | MICCsetRange8G(x) MICCsendCmd(x, MICC_CMD_RANGE_8G) |
#define | MICCreset(x) MICCsendCmd(x, MICC_CMD_RESET) |
Functions | |
int | MICCreadRelativeHeading (tSensors link) |
int | MICCreadTurnRate (tSensors link) |
bool | MICCreadAccel (tSensors link, int &x_accel, int &y_accel, int &z_accel) |
bool | MICCsendCmd (tSensors link, ubyte command) |
Variables | |
tByteArray | MICC_I2CRequest |
tByteArray | MICC_I2CReply |
CruizCore XG1300L
#define MICC_ACC_ANG 0x42 |
MICC Accumulated angle (2 bytes)
Definition at line 44 of file microinfinity-cruizcore.h.
#define MICC_CMD_RANGE_2G 0x61 |
MICC Acceleration up to 2G
Definition at line 53 of file microinfinity-cruizcore.h.
#define MICC_CMD_RANGE_4G 0x62 |
MICC Acceleration up to 4G
Definition at line 54 of file microinfinity-cruizcore.h.
#define MICC_CMD_RANGE_8G 0x63 |
MICC Acceleration up to 8G
Definition at line 55 of file microinfinity-cruizcore.h.
#define MICC_CMD_RESET 0x60 |
MICC Reset the device
Definition at line 52 of file microinfinity-cruizcore.h.
#define MICC_I2C_ADDR 0x02 |
MICC I2C device address
Definition at line 42 of file microinfinity-cruizcore.h.
#define MICC_TURN_RATE 0x44 |
MICC Rate of Turn (2 bytes)
Definition at line 46 of file microinfinity-cruizcore.h.
#define MICC_X_ACCEL 0x46 |
MICC X acceleration data (2 bytes)
Definition at line 48 of file microinfinity-cruizcore.h.
#define MICC_Y_ACCEL 0x48 |
MICC Y acceleration data (2 bytes)
Definition at line 49 of file microinfinity-cruizcore.h.
#define MICC_Z_ACCEL 0x4A |
MICC Z acceleration data (2 bytes)
Definition at line 50 of file microinfinity-cruizcore.h.
#define MICCreset | ( | x ) | MICCsendCmd(x, MICC_CMD_RESET) |
Macro for resetting sensor
Definition at line 65 of file microinfinity-cruizcore.h.
#define MICCsetRange2G | ( | x ) | MICCsendCmd(x, MICC_CMD_RANGE_2G) |
Macro for setting sensor to 2G range
Definition at line 62 of file microinfinity-cruizcore.h.
#define MICCsetRange4G | ( | x ) | MICCsendCmd(x, MICC_CMD_RANGE_4G) |
Macro for setting sensor to 4G range
Definition at line 63 of file microinfinity-cruizcore.h.
#define MICCsetRange8G | ( | x ) | MICCsendCmd(x, MICC_CMD_RANGE_8G) |
Macro for setting sensor to 8G range
Definition at line 64 of file microinfinity-cruizcore.h.
bool MICCreadAccel | ( | tSensors | link, |
int & | x_accel, | ||
int & | y_accel, | ||
int & | z_accel | ||
) |
Read acceleration data from the sensor
link | the sensor port number |
x_accel | X acceleration data |
y_accel | Y acceleration data |
z_accel | Z acceleration data |
Definition at line 117 of file microinfinity-cruizcore.h.
int MICCreadRelativeHeading | ( | tSensors | link ) |
Return the current relative heading, value between -179 and 180 degrees.
Angle is measured in 100th degrees. So 12899 = 128.99 degrees.
Definition at line 76 of file microinfinity-cruizcore.h.
int MICCreadTurnRate | ( | tSensors | link ) |
Return the Rate of Turn in degrees per second
Definition at line 95 of file microinfinity-cruizcore.h.
bool MICCsendCmd | ( | tSensors | link, |
ubyte | command | ||
) |
Send a command to the sensor
link | the sensor port number |
command | the command to be sent |
Definition at line 141 of file microinfinity-cruizcore.h.
Array to hold I2C reply data
Definition at line 68 of file microinfinity-cruizcore.h.
Array to hold I2C command data
Definition at line 67 of file microinfinity-cruizcore.h.