12 #include "frc/AnalogInput.h"
13 #include "frc/ErrorBase.h"
14 #include "frc/PIDSource.h"
15 #include "frc/smartdashboard/SendableBase.h"
112 void InitAccelerometer();
114 std::shared_ptr<AnalogInput> m_analogInput;
115 double m_voltsPerG = 1.0;
116 double m_zeroGVoltage = 2.5;
double PIDGet() override
Get the Acceleration for the PID Source parent.
WPILib FRC namespace.
Definition: SPIAccelerometerSim.h:18
void InitSendable(SendableBuilder &builder) override
Initializes this Sendable object.
PIDSource interface is a generic sensor source for the PID class.
Definition: PIDSource.h:20
double GetAcceleration() const
Return the acceleration in Gs.
void SetSensitivity(double sensitivity)
Set the accelerometer sensitivity.
Handle operation of an analog accelerometer.
Definition: AnalogAccelerometer.h:26
Base class for most objects.
Definition: ErrorBase.h:74
Definition: SendableBase.h:19
Definition: SendableBuilder.h:23
void SetZero(double zero)
Set the voltage that corresponds to 0 G.
AnalogAccelerometer(int channel)
Create a new instance of an accelerometer.