13 #include "LiveWindow/LiveWindowSendable.h"
15 #include "SensorBase.h"
16 #include "interfaces/Accelerometer.h"
30 enum Axes { kAxis_X = 0x00, kAxis_Y = 0x02, kAxis_Z = 0x04 };
38 explicit ADXL362(Range range = kRange_2G);
39 explicit ADXL362(SPI::Port port, Range range = kRange_2G);
47 double GetX()
override;
48 double GetY()
override;
49 double GetZ()
override;
55 void InitTable(std::shared_ptr<ITable> subtable)
override;
57 std::shared_ptr<ITable>
GetTable()
const override;
63 double m_gsPerLSB = 0.001;
65 std::shared_ptr<ITable> m_table;
Live Window Sendable is a special type of object sendable to the live window.
Definition: LiveWindowSendable.h:17
virtual AllAxes GetAccelerations()
Get the acceleration of all axes in Gs.
Definition: ADXL362.cpp:138
void InitTable(std::shared_ptr< ITable > subtable) override
Initializes a table for this sendable object.
Definition: ADXL362.cpp:169
double GetY() override
Common interface for getting the y axis acceleration.
Definition: ADXL362.cpp:108
std::shared_ptr< ITable > GetTable() const override
Definition: ADXL362.cpp:182
std::string GetSmartDashboardType() const override
Definition: ADXL362.cpp:165
SPI bus interface class.
Definition: SPI.h:28
ADXL362 SPI Accelerometer.
Definition: ADXL362.h:28
void SetRange(Range range) override
Common interface for setting the measuring range of an accelerometer.
Definition: ADXL362.cpp:80
void StopLiveWindowMode() override
Stop having this sendable object automatically respond to value changes.
Definition: ADXL362.h:59
void StartLiveWindowMode() override
Start having this sendable object automatically respond to value changes reflect the value on the tab...
Definition: ADXL362.h:58
Class to write to digital outputs.
Definition: DigitalOutput.h:26
void UpdateTable() override
Update the table for this sendable object with the latest values.
Definition: ADXL362.cpp:174
Interface for 3-axis accelerometers.
Definition: Accelerometer.h:15
double GetX() override
Common interface for getting the x axis acceleration.
Definition: ADXL362.cpp:106
double GetZ() override
Common interface for getting the z axis acceleration.
Definition: ADXL362.cpp:110
ADXL362(Range range=kRange_2G)
Constructor.
Definition: ADXL362.cpp:40
virtual double GetAcceleration(Axes axis)
Get the acceleration of one axis in Gs.
Definition: ADXL362.cpp:118