18 #ifndef ROVERAPI_ROVER_HMC5883L_HPP_ 19 #define ROVERAPI_ROVER_HMC5883L_HPP_ 162 inline T
MINIMUM_ (
const T& a,
const T& b);
171 inline T
MAXIMUM_ (
const T& a,
const T& b);
int16_t xMaxRaw
Calibration variable to hold the maximum of xRaw results.
Definition: rover_hmc5883l.hpp:68
RoverSensor class is an abstract class to define interface between common sensors used in the rover...
Definition: rover_sensor.hpp:48
int16_t xMinRaw
Calibration variable to hold the minimum of xRaw results.
Definition: rover_hmc5883l.hpp:63
float read(void)
Reads the bearing value from Bearing sensor Sunfounder HMC5883L (float).
Definition: rover_hmc5883l.cpp:95
RoverHMC5883L()
Constructor for the RoverHMC5883L class.
Definition: rover_hmc5883l.cpp:26
int getHMC588LAddress(void)
Returns the private attribute HMC588L_ADDRESS.
Definition: rover_hmc5883l.cpp:180
int CALIBRATION_DURATION
Calibration duration for compass sensor.
Definition: rover_hmc5883l.hpp:43
float DECLINATION_ANGLE
Declination angle / correction factor for compass sensor.
Definition: rover_hmc5883l.hpp:48
int16_t yMaxRaw
Calibration variable to hold the maximum of yRaw results.
Definition: rover_hmc5883l.hpp:78
rover Namespace contains classes to manage Rover sensors, gpio, buzzer, buttons, driving, utilities, and cloud.
Definition: rover_api.hpp:293
void setHMC588LCalibrationPeriod(const int period)
Sets the HMC588L Calibration Duration.
Definition: rover_hmc5883l.cpp:175
void setHMC588LAddress(const int address)
Sets the HMC588L Address.
Definition: rover_hmc5883l.cpp:165
T MAXIMUM_(const T &a, const T &b)
Inline macro to find maximum of two values regardles of their types (template).
Definition: rover_hmc5883l.cpp:202
float getHMC588LDeclinationAngle(void)
Returns the HMC588L Declination angle.
Definition: rover_hmc5883l.cpp:185
int16_t yMinRaw
Calibration variable to hold the minimum of yRaw results.
Definition: rover_hmc5883l.hpp:73
void initialize(void)
Function to setup HMC5883L sensor.
Definition: rover_hmc5883l.cpp:43
void calibrate(void)
Starts calibration for the bearing sensor.
Definition: rover_hmc5883l.cpp:73
RoverHMC5883L is a class that is inherited from RoverSensor abstract class. RoverHMC5883L class conta...
Definition: rover_hmc5883l.hpp:31
unsigned int calibration_start
Calibration variable for HMC5883L.
Definition: rover_hmc5883l.hpp:53
int getHMC588LCalibrationPeriod(void)
Returns the HMC588L Calibration Duration.
Definition: rover_hmc5883l.cpp:190
int i2c_hmc588l_fd
Private member attribute for I2C file descriptor.
Definition: rover_hmc5883l.hpp:83
void setHMC588LDeclinationAngle(const float angle)
Sets the HMC588L Declination angle.
Definition: rover_hmc5883l.cpp:170
int ROVERHMC5883L_SETUP_
Flag to hold if HMC5883L is set up.
Definition: rover_hmc5883l.hpp:58
T MINIMUM_(const T &a, const T &b)
Inline macro to find minimum of two values regardles of their types (template).
Definition: rover_hmc5883l.cpp:196
int HMC588L_ADDRESS
Address for compass sensor.
Definition: rover_hmc5883l.hpp:38
~RoverHMC5883L()
Destructor for the RoverHMC5883L class.
Definition: rover_hmc5883l.cpp:41