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 | |
◆ 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 |
( |
| ) |
|
|
overridevirtual |
Common interface for getting the x axis acceleration.
- Returns
- The acceleration along the x axis in g-forces
Implements frc::Accelerometer.
◆ GetY()
double frc::ADXL362::GetY |
( |
| ) |
|
|
overridevirtual |
Common interface for getting the y axis acceleration.
- Returns
- The acceleration along the y axis in g-forces
Implements frc::Accelerometer.
◆ GetZ()
double frc::ADXL362::GetZ |
( |
| ) |
|
|
overridevirtual |
Common interface for getting the z axis acceleration.
- Returns
- The acceleration along the z axis in g-forces
Implements frc::Accelerometer.
◆ InitSendable()
Initializes this Sendable object.
- Parameters
-
Implements nt::NTSendable.
◆ operator=()
◆ SetRange()
void frc::ADXL362::SetRange |
( |
Range |
range | ) |
|
|
finalvirtual |
Common interface for setting the measuring range of an accelerometer.
- Parameters
-
range | The maximum acceleration, positive or negative, that the accelerometer will measure. Not all accelerometers support all ranges. |
Implements frc::Accelerometer.
The documentation for this class was generated from the following file: