WPILibC++ 2023.4.3-108-ge5452e3
|
Interface for 3-axis accelerometers. More...
#include <frc/interfaces/Accelerometer.h>
Public Types | |
enum | Range { kRange_2G = 0 , kRange_4G = 1 , kRange_8G = 2 , kRange_16G = 3 } |
Public Member Functions | |
Accelerometer ()=default | |
virtual | ~Accelerometer ()=default |
Accelerometer (Accelerometer &&)=default | |
Accelerometer & | operator= (Accelerometer &&)=default |
virtual void | SetRange (Range range)=0 |
Common interface for setting the measuring range of an accelerometer. More... | |
virtual double | GetX ()=0 |
Common interface for getting the x axis acceleration. More... | |
virtual double | GetY ()=0 |
Common interface for getting the y axis acceleration. More... | |
virtual double | GetZ ()=0 |
Common interface for getting the z axis acceleration. More... | |
Interface for 3-axis accelerometers.
|
default |
|
virtualdefault |
|
default |
|
pure virtual |
Common interface for getting the x axis acceleration.
Implemented in frc::ADXL345_I2C, frc::ADXL345_SPI, frc::ADXL362, and frc::BuiltInAccelerometer.
|
pure virtual |
Common interface for getting the y axis acceleration.
Implemented in frc::ADXL345_I2C, frc::ADXL345_SPI, frc::ADXL362, and frc::BuiltInAccelerometer.
|
pure virtual |
Common interface for getting the z axis acceleration.
Implemented in frc::ADXL345_I2C, frc::ADXL345_SPI, frc::ADXL362, and frc::BuiltInAccelerometer.
|
default |
|
pure virtual |
Common interface for setting the measuring range of an accelerometer.
range | The maximum acceleration, positive or negative, that the accelerometer will measure. Not all accelerometers support all ranges. |
Implemented in frc::ADXL345_I2C, frc::ADXL345_SPI, frc::ADXL362, and frc::BuiltInAccelerometer.