ADXL362 SPI Accelerometer.
More...
#include <ADXL362.h>
|
enum | Axes { kAxis_X = 0x00,
kAxis_Y = 0x02,
kAxis_Z = 0x04
} |
|
enum | Range { kRange_2G = 0,
kRange_4G = 1,
kRange_8G = 2,
kRange_16G = 3
} |
|
|
| ADXL362 (Range range=kRange_2G) |
| Constructor. More...
|
|
| ADXL362 (SPI::Port port, Range range=kRange_2G) |
| Constructor. More...
|
|
| ADXL362 (const ADXL362 &)=delete |
|
ADXL362 & | operator= (const ADXL362 &)=delete |
|
virtual void | SetRange (Range range) override |
| {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. |
}
|
|
virtual double | GetX () override |
| {Common interface for getting the x axis acceleration.- Returns
- The acceleration along the x axis in g-forces
}
|
|
virtual double | GetY () override |
| {Common interface for getting the y axis acceleration.- Returns
- The acceleration along the y axis in g-forces
}
|
|
virtual double | GetZ () override |
| {Common interface for getting the z axis acceleration.- Returns
- The acceleration along the z axis in g-forces
}
|
|
virtual double | GetAcceleration (Axes axis) |
| Get the acceleration of one axis in Gs. More...
|
|
virtual AllAxes | GetAccelerations () |
| Get the acceleration of all axes in Gs. More...
|
|
virtual std::string | GetSmartDashboardType () const override |
|
virtual void | InitTable (std::shared_ptr< ITable > subtable) override |
| Initializes a table for this sendable object. More...
|
|
virtual void | UpdateTable () override |
| Update the table for this sendable object with the latest values.
|
|
virtual std::shared_ptr< ITable > | GetTable () const override |
|
virtual void | StartLiveWindowMode () override |
| Start having this sendable object automatically respond to value changes reflect the value on the table.
|
|
virtual void | StopLiveWindowMode () override |
| Stop having this sendable object automatically respond to value changes.
|
|
ADXL362 SPI Accelerometer.
This class allows access to an Analog Devices ADXL362 3-axis accelerometer.
ADXL362::ADXL362 |
( |
Range |
range = kRange_2G | ) |
|
Constructor.
Uses the onboard CS1.
- Parameters
-
range | The range (+ or -) that the accelerometer will measure. |
ADXL362::ADXL362 |
( |
SPI::Port |
port, |
|
|
Range |
range = kRange_2G |
|
) |
| |
Constructor.
- Parameters
-
port | The SPI port the accelerometer is attached to |
range | The range (+ or -) that the accelerometer will measure. |
double ADXL362::GetAcceleration |
( |
ADXL362::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.
Get the acceleration of all axes in Gs.
- Returns
- An object containing the acceleration measured on each axis of the ADXL362 in Gs.
std::string ADXL362::GetSmartDashboardType |
( |
| ) |
const |
|
overridevirtual |
- Returns
- the string representation of the named data type that will be used by the smart dashboard for this sendable
Implements Sendable.
std::shared_ptr< ITable > ADXL362::GetTable |
( |
| ) |
const |
|
overridevirtual |
- Returns
- the table that is currently associated with the sendable
Implements Sendable.
void ADXL362::InitTable |
( |
std::shared_ptr< ITable > |
subtable | ) |
|
|
overridevirtual |
Initializes a table for this sendable object.
- Parameters
-
subtable | The table to put the values in. |
Implements Sendable.
The documentation for this class was generated from the following files:
- Athena/include/ADXL362.h
- Athena/src/ADXL362.cpp