13 #include "LiveWindow/LiveWindowSendable.h" 15 #include "SensorBase.h" 16 #include "interfaces/Accelerometer.h" 17 #include "networktables/NetworkTableEntry.h" 31 enum Axes { kAxis_X = 0x00, kAxis_Y = 0x02, kAxis_Z = 0x04 };
39 explicit ADXL362(Range range = kRange_2G);
40 explicit ADXL362(SPI::Port port, Range range = kRange_2G);
48 double GetX()
override;
49 double GetY()
override;
50 double GetZ()
override;
56 void InitTable(std::shared_ptr<nt::NetworkTable> subtable)
override;
63 double m_gsPerLSB = 0.001;
void InitTable(std::shared_ptr< nt::NetworkTable > subtable) override
Initializes a table for this sendable object.
Definition: ADXL362.cpp:170
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:139
double GetY() override
Common interface for getting the y axis acceleration.
Definition: ADXL362.cpp:109
std::string GetSmartDashboardType() const override
Definition: ADXL362.cpp:166
SPI bus interface class.
Definition: SPI.h:28
ADXL362 SPI Accelerometer.
Definition: ADXL362.h:29
void SetRange(Range range) override
Common interface for setting the measuring range of an accelerometer.
Definition: ADXL362.cpp:81
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:27
void UpdateTable() override
Update the table for this sendable object with the latest values.
Definition: ADXL362.cpp:183
NetworkTables Entry.
Definition: NetworkTableEntry.h:30
Interface for 3-axis accelerometers.
Definition: Accelerometer.h:15
double GetX() override
Common interface for getting the x axis acceleration.
Definition: ADXL362.cpp:107
double GetZ() override
Common interface for getting the z axis acceleration.
Definition: ADXL362.cpp:111
ADXL362(Range range=kRange_2G)
Constructor.
Definition: ADXL362.cpp:41
virtual double GetAcceleration(Axes axis)
Get the acceleration of one axis in Gs.
Definition: ADXL362.cpp:119