10 #include "interfaces/Accelerometer.h"
11 #include "SensorBase.h"
13 #include "LiveWindow/LiveWindowSendable.h"
27 enum Axes { kAxis_X = 0x00, kAxis_Y = 0x02, kAxis_Z = 0x04 };
35 ADXL362(Range range = kRange_2G);
36 ADXL362(SPI::Port port, Range range = kRange_2G);
43 virtual void SetRange(Range range)
override;
44 virtual double GetX()
override;
45 virtual double GetY()
override;
46 virtual double GetZ()
override;
52 virtual void InitTable(std::shared_ptr<ITable> subtable)
override;
54 virtual std::shared_ptr<ITable>
GetTable()
const override;
60 double m_gsPerLSB = 0.001;
62 std::shared_ptr<ITable> m_table;
virtual void SetRange(Range range) override
{Common interface for setting the measuring range of an accelerometer.The maximum acceleration...
Definition: ADXL362.cpp:77
Live Window Sendable is a special type of object sendable to the live window.
Definition: LiveWindowSendable.h:18
SPI bus interface class.
Definition: SPI.h:23
virtual double GetZ() override
{Common interface for getting the z axis acceleration.The acceleration along the z axis in g-forces} ...
Definition: ADXL362.cpp:109
virtual std::string GetSmartDashboardType() const override
Definition: ADXL362.cpp:164
Class to write to digital outputs.
Definition: DigitalOutput.h:22
virtual double GetX() override
{Common interface for getting the x axis acceleration.The acceleration along the x axis in g-forces} ...
Definition: ADXL362.cpp:103
virtual void StopLiveWindowMode() override
Stop having this sendable object automatically respond to value changes.
Definition: ADXL362.h:56
virtual double GetAcceleration(Axes axis)
Get the acceleration of one axis in Gs.
Definition: ADXL362.cpp:117
virtual void UpdateTable() override
Update the table for this sendable object with the latest values.
Definition: ADXL362.cpp:173
virtual AllAxes GetAccelerations()
Get the acceleration of all axes in Gs.
Definition: ADXL362.cpp:137
ADXL362 SPI Accelerometer.
Definition: ADXL362.h:25
virtual std::shared_ptr< ITable > GetTable() const override
Definition: ADXL362.cpp:181
virtual double GetY() override
{Common interface for getting the y axis acceleration.The acceleration along the y axis in g-forces} ...
Definition: ADXL362.cpp:106
ADXL362(Range range=kRange_2G)
Constructor.
Definition: ADXL362.cpp:36
virtual void InitTable(std::shared_ptr< ITable > subtable) override
Initializes a table for this sendable object.
Definition: ADXL362.cpp:168
Interface for 3-axis accelerometers.
Definition: Accelerometer.h:13
virtual void StartLiveWindowMode() override
Start having this sendable object automatically respond to value changes reflect the value on the tab...
Definition: ADXL362.h:55