Header file for the magnetometer driver. More...
Go to the source code of this file.
Functions | |
float | magneto_get_curr_bearing (void) |
Gets the current bearing of the magnetometer sensor. More... | |
float | magneto_get_true_bearing (void) |
Gets the true bearing of the magnetometer sensor. More... | |
void | magneto_init (void) |
Initializes the magnetometer by initializing the USB, I2C, and setting the GPIO pins. | |
bool | magneto_is_bearing_invalid (void) |
Checks if the current bearing is invalid if it is out of bounds. More... | |
void | magneto_read_data (void) |
Reads magnetometer data from the magnetometer sensor and outputs the values into the global variables. More... | |
Header file for the magnetometer driver.
float magneto_get_curr_bearing | ( | void | ) |
Gets the current bearing of the magnetometer sensor.
References gp_current_bearing.
float magneto_get_true_bearing | ( | void | ) |
Gets the true bearing of the magnetometer sensor.
References gp_true_heading.
bool magneto_is_bearing_invalid | ( | void | ) |
Checks if the current bearing is invalid if it is out of bounds.
References gp_current_bearing, gp_max_bearing, and gp_min_bearing.
void magneto_read_data | ( | void | ) |
Reads magnetometer data from the magnetometer sensor and outputs the values into the global variables.
References gp_current_bearing, gp_max_bearing, gp_min_bearing, gp_true_heading, MAGNETO_BEARING_OFFSET, and MAGNETO_METER_ADDR.