13 #include "AnalogInput.h"
14 #include "LiveWindow/LiveWindowSendable.h"
15 #include "PIDSource.h"
16 #include "SensorBase.h"
44 void InitTable(std::shared_ptr<ITable> subTable)
override;
45 std::shared_ptr<ITable>
GetTable()
const override;
48 void InitAccelerometer();
50 std::shared_ptr<AnalogInput> m_analogInput;
51 double m_voltsPerG = 1.0;
52 double m_zeroGVoltage = 2.5;
54 std::shared_ptr<ITable> m_table;
void UpdateTable() override
Update the table for this sendable object with the latest values.
Definition: AnalogAccelerometer.cpp:118
void SetSensitivity(double sensitivity)
Set the accelerometer sensitivity.
Definition: AnalogAccelerometer.cpp:97
Live Window Sendable is a special type of object sendable to the live window.
Definition: LiveWindowSendable.h:17
Base class for all sensors.
Definition: SensorBase.h:20
void StartLiveWindowMode() override
Start having this sendable object automatically respond to value changes reflect the value on the tab...
Definition: AnalogAccelerometer.cpp:124
double GetAcceleration() const
Return the acceleration in Gs.
Definition: AnalogAccelerometer.cpp:84
PIDSource interface is a generic sensor source for the PID class.
Definition: PIDSource.h:19
void InitTable(std::shared_ptr< ITable > subTable) override
Initializes a table for this sendable object.
Definition: AnalogAccelerometer.cpp:132
void StopLiveWindowMode() override
Stop having this sendable object automatically respond to value changes.
Definition: AnalogAccelerometer.cpp:126
AnalogAccelerometer(int channel)
Create a new instance of an accelerometer.
Definition: AnalogAccelerometer.cpp:34
Handle operation of an analog accelerometer.
Definition: AnalogAccelerometer.h:26
std::shared_ptr< ITable > GetTable() const override
Definition: AnalogAccelerometer.cpp:137
std::string GetSmartDashboardType() const override
Definition: AnalogAccelerometer.cpp:128
double PIDGet() override
Get the Acceleration for the PID Source parent.
Definition: AnalogAccelerometer.cpp:116
void SetZero(double zero)
Set the voltage that corresponds to 0 G.
Definition: AnalogAccelerometer.cpp:109