13 #include "AnalogInput.h" 14 #include "LiveWindow/LiveWindowSendable.h" 15 #include "PIDSource.h" 16 #include "SensorBase.h" 17 #include "networktables/NetworkTableEntry.h" 45 void InitTable(std::shared_ptr<nt::NetworkTable> subTable)
override;
48 void InitAccelerometer();
50 std::shared_ptr<AnalogInput> m_analogInput;
51 double m_voltsPerG = 1.0;
52 double m_zeroGVoltage = 2.5;
void UpdateTable() override
Update the table for this sendable object with the latest values.
Definition: AnalogAccelerometer.cpp:119
void SetSensitivity(double sensitivity)
Set the accelerometer sensitivity.
Definition: AnalogAccelerometer.cpp:98
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:123
double GetAcceleration() const
Return the acceleration in Gs.
Definition: AnalogAccelerometer.cpp:85
PIDSource interface is a generic sensor source for the PID class.
Definition: PIDSource.h:19
void InitTable(std::shared_ptr< nt::NetworkTable > subTable) override
Initializes a table for this sendable object.
Definition: AnalogAccelerometer.cpp:131
void StopLiveWindowMode() override
Stop having this sendable object automatically respond to value changes.
Definition: AnalogAccelerometer.cpp:125
AnalogAccelerometer(int channel)
Create a new instance of an accelerometer.
Definition: AnalogAccelerometer.cpp:35
Handle operation of an analog accelerometer.
Definition: AnalogAccelerometer.h:27
std::string GetSmartDashboardType() const override
Definition: AnalogAccelerometer.cpp:127
NetworkTables Entry.
Definition: NetworkTableEntry.h:30
double PIDGet() override
Get the Acceleration for the PID Source parent.
Definition: AnalogAccelerometer.cpp:117
void SetZero(double zero)
Set the voltage that corresponds to 0 G.
Definition: AnalogAccelerometer.cpp:110