135 double m_gsPerLSB = 0.001;
ADXL362 SPI Accelerometer.
Definition ADXL362.h:20
ADXL362(SPI::Port port, Range range=kRange_2G)
Constructor.
~ADXL362() override=default
void SetRange(Range range)
Set the measuring range of the accelerometer.
Range
Accelerometer range.
Definition ADXL362.h:25
@ kRange_8G
8 Gs max.
Definition ADXL362.h:31
@ kRange_2G
2 Gs max.
Definition ADXL362.h:27
@ kRange_4G
4 Gs max.
Definition ADXL362.h:29
virtual AllAxes GetAccelerations()
Get the acceleration of all axes in Gs.
double GetX()
Returns the acceleration along the X axis in g-forces.
virtual double GetAcceleration(Axes axis)
Get the acceleration of one axis in Gs.
ADXL362 & operator=(ADXL362 &&)=default
Axes
Accelerometer axes.
Definition ADXL362.h:37
@ kAxis_X
X axis.
Definition ADXL362.h:39
@ kAxis_Y
Y axis.
Definition ADXL362.h:41
@ kAxis_Z
Z axis.
Definition ADXL362.h:43
double GetY()
Returns the acceleration along the Y axis in g-forces.
ADXL362(ADXL362 &&)=default
SPI::Port GetSpiPort() const
double GetZ()
Returns the acceleration along the Z axis in g-forces.
void InitSendable(nt::NTSendableBuilder &builder) override
Initializes this Sendable object.
ADXL362(Range range=kRange_2G)
Constructor.
SPI bus interface class.
Definition SPI.h:27
Port
SPI port.
Definition SPI.h:32
A move-only C++ wrapper around a HAL simulator device handle.
Definition SimDevice.h:645
C++ wrapper around a HAL simulator double value handle.
Definition SimDevice.h:536
C++ wrapper around a HAL simulator enum value handle.
Definition SimDevice.h:577
Helper class for building Sendable dashboard representations for NetworkTables.
Definition NTSendableBuilder.h:22
Interface for NetworkTable Sendable objects.
Definition NTSendable.h:16
A helper class for use with objects that add themselves to SendableRegistry.
Definition SendableHelper.h:21
Container type for accelerations from all axes.
Definition ADXL362.h:49
double YAxis
Acceleration along the Y axis in g-forces.
Definition ADXL362.h:53
double XAxis
Acceleration along the X axis in g-forces.
Definition ADXL362.h:51
double ZAxis
Acceleration along the Z axis in g-forces.
Definition ADXL362.h:55