MagneticSensor Class Reference
An abstract class for a magnetometer. More...
#include <MagneticSensor.h>
Inherits GenericSensor.
Inherited by LIS3MDL.
Public Member Functions | |
virtual int | Get_M_Axes (int32_t *pData)=0 |
Get current magnetometer magnetic X/Y/Z-axes values in standard data units [mgauss]. | |
virtual int | Get_M_AxesRaw (int16_t *pData)=0 |
Get current magnetometer raw data X/Y/Z-axes values in device sepcific LSB units. | |
virtual int | Init (void *ptr)=0 |
Initialization of sensor. | |
virtual int | ReadID (uint8_t *id)=0 |
Get ID of sensor. |
Detailed Description
An abstract class for a magnetometer.
Definition at line 49 of file MagneticSensor.h.
Member Function Documentation
virtual int Get_M_Axes | ( | int32_t * | pData ) | [pure virtual] |
Get current magnetometer magnetic X/Y/Z-axes values in standard data units [mgauss].
- Parameters:
-
[out] pData Pointer to where to store magnetic values to. pData must point to an array of (at least) three elements, where: pData[0] corresponds to X-axis, pData[1] corresponds to Y-axis, and pData[2] corresponds to Z-axis.
- Returns:
- 0 in case of success, an error code otherwise
Implemented in LIS3MDL.
virtual int Get_M_AxesRaw | ( | int16_t * | pData ) | [pure virtual] |
Get current magnetometer raw data X/Y/Z-axes values in device sepcific LSB units.
- Parameters:
-
[out] pData Pointer to where to store magnetometer raw data to. pData must point to an array of (at least) three elements, where: pData[0] corresponds to X-axis, pData[1] corresponds to Y-axis, and pData[2] corresponds to Z-axis.
- Returns:
- 0 in case of success, an error code otherwise
Implemented in LIS3MDL.
virtual int Init | ( | void * | ptr ) | [pure virtual, inherited] |
Generated on Tue Jul 12 2022 20:24:47 by 1.7.2