17 #ifndef ROVERAPI_ROVER_QMC5883L_HPP_ 18 #define ROVERAPI_ROVER_QMC5883L_HPP_ 158 inline T
MINIMUM_ (
const T& a,
const T& b);
167 inline T
MAXIMUM_ (
const T& a,
const T& b);
RoverSensor class is an abstract class to define interface between common sensors used in the rover...
Definition: rover_sensor.hpp:48
int16_t xMaxRaw
Calibration variable to hold the maximum of xRaw results.
Definition: rover_qmc5883l.hpp:64
int16_t yMinRaw
Calibration variable to hold the minimum of yRaw results.
Definition: rover_qmc5883l.hpp:69
T MINIMUM_(const T &a, const T &b)
Inline macro to find minimum of two values regardles of their types (template).
Definition: rover_qmc5883l.cpp:180
int QMC5883L_ADDRESS
Address for compass sensor.
Definition: rover_qmc5883l.hpp:34
int16_t yMaxRaw
Calibration variable to hold the maximum of yRaw results.
Definition: rover_qmc5883l.hpp:74
void setQMC5883LCalibrationPeriod(const int period)
Sets the QMC588L Calibration Duration.
Definition: rover_qmc5883l.cpp:159
RoverQMC5883L is a class that is inherited from RoverSensor abstract class. RoverQMC5883L class conta...
Definition: rover_qmc5883l.hpp:27
RoverQMC5883L()
Constructor for the RoverQMC5883L class.
Definition: rover_qmc5883l.cpp:26
rover Namespace contains classes to manage Rover sensors, gpio, buzzer, buttons, driving, utilities, and cloud.
Definition: rover_api.hpp:293
int getQMC5883LAddress(void)
Returns the private attribute QMC588L_ADDRESS.
Definition: rover_qmc5883l.cpp:164
void setQMC5883LAddress(const int address)
Sets the QMC588L Address.
Definition: rover_qmc5883l.cpp:149
float getQMC5883LDeclinationAngle(void)
Returns the QMC588L Declination angle.
Definition: rover_qmc5883l.cpp:169
void setQMC5883LDeclinationAngle(const float angle)
Sets the QMC588L Declination angle.
Definition: rover_qmc5883l.cpp:154
void calibrate(void) const
Starts calibration for the bearing sensor.
void initialize(void)
Function to setup QMC5883L sensor.
Definition: rover_qmc5883l.cpp:43
T MAXIMUM_(const T &a, const T &b)
Inline macro to find maximum of two values regardles of their types (template).
Definition: rover_qmc5883l.cpp:186
float DECLINATION_ANGLE
Declination angle / correction factor for compass sensor.
Definition: rover_qmc5883l.hpp:44
~RoverQMC5883L()
Destructor for the RoverQMC5883L class.
Definition: rover_qmc5883l.cpp:41
int getQMC5883LCalibrationPeriod(void)
Returns the QMC588L Calibration Duration.
Definition: rover_qmc5883l.cpp:174
int ROVERQMC5883L_SETUP_
Flag to hold if RoverQMC5883L is set up.
Definition: rover_qmc5883l.hpp:54
unsigned int calibration_start
Calibration variable for QMC5883L.
Definition: rover_qmc5883l.hpp:49
int i2c_qmc588l_fd
Private member attribute for I2C file descriptor.
Definition: rover_qmc5883l.hpp:79
int16_t xMinRaw
Calibration variable to hold the minimum of xRaw results.
Definition: rover_qmc5883l.hpp:59
int CALIBRATION_DURATION
Calibration duration for compass sensor.
Definition: rover_qmc5883l.hpp:39
float read(void)
Reads the bearing value from Bearing sensor QMC5883L (float).
Definition: rover_qmc5883l.cpp:75