ADXL362 SPI Accelerometer.
More...
#include <frc/ADXL362.h>
ADXL362 SPI Accelerometer.
This class allows access to an Analog Devices ADXL362 3-axis accelerometer.
◆ Axes
Enumerator |
---|
kAxis_X | |
kAxis_Y | |
kAxis_Z | |
◆ Range
Enumerator |
---|
kRange_2G | |
kRange_4G | |
kRange_8G | |
◆ ADXL362() [1/3]
Constructor.
Uses the onboard CS1.
- Parameters
-
range | The range (+ or -) that the accelerometer will measure. |
◆ ADXL362() [2/3]
Constructor.
- Parameters
-
port | The SPI port the accelerometer is attached to |
range | The range (+ or -) that the accelerometer will measure. |
◆ ~ADXL362()
frc::ADXL362::~ADXL362 |
( |
| ) |
|
|
overridedefault |
◆ ADXL362() [3/3]
frc::ADXL362::ADXL362 |
( |
ADXL362 && |
| ) |
|
|
default |
◆ GetAcceleration()
virtual double frc::ADXL362::GetAcceleration |
( |
Axes |
axis | ) |
|
|
virtual |
Get the acceleration of one axis in Gs.
- Parameters
-
axis | The axis to read from. |
- Returns
- Acceleration of the ADXL362 in Gs.
◆ GetAccelerations()
virtual AllAxes frc::ADXL362::GetAccelerations |
( |
| ) |
|
|
virtual |
Get the acceleration of all axes in Gs.
- Returns
- An object containing the acceleration measured on each axis of the ADXL362 in Gs.
◆ GetSpiPort()
◆ GetX()
double frc::ADXL362::GetX |
( |
| ) |
|
Returns the acceleration along the X axis in g-forces.
- Returns
- The acceleration along the X axis in g-forces.
◆ GetY()
double frc::ADXL362::GetY |
( |
| ) |
|
Returns the acceleration along the Y axis in g-forces.
- Returns
- The acceleration along the Y axis in g-forces.
◆ GetZ()
double frc::ADXL362::GetZ |
( |
| ) |
|
Returns the acceleration along the Z axis in g-forces.
- Returns
- The acceleration along the Z axis in g-forces.
◆ InitSendable()
Initializes this Sendable object.
- Parameters
-
Implements nt::NTSendable.
◆ operator=()
◆ SetRange()
void frc::ADXL362::SetRange |
( |
Range |
range | ) |
|
Set the measuring range of the accelerometer.
- Parameters
-
range | The maximum acceleration, positive or negative, that the accelerometer will measure. |
The documentation for this class was generated from the following file: