12 #include "frc/AnalogInput.h"
13 #include "frc/ErrorBase.h"
14 #include "frc/PIDSource.h"
15 #include "frc/smartdashboard/Sendable.h"
16 #include "frc/smartdashboard/SendableHelper.h"
20 class SendableBuilder;
116 void InitAccelerometer();
118 std::shared_ptr<AnalogInput> m_analogInput;
119 double m_voltsPerG = 1.0;
120 double m_zeroGVoltage = 2.5;
PIDSource interface is a generic sensor source for the PID class.
Definition: PIDSource.h:20
Handle operation of an analog accelerometer.
Definition: AnalogAccelerometer.h:29
double PIDGet() override
Get the Acceleration for the PID Source parent.
void InitSendable(SendableBuilder &builder) override
Initializes this Sendable object.
void SetSensitivity(double sensitivity)
Set the accelerometer sensitivity.
Base class for most objects.
Definition: ErrorBase.h:104
Interface for Sendable objects.
Definition: Sendable.h:17
void SetZero(double zero)
Set the voltage that corresponds to 0 G.
A class that enforces constraints on the differential drive kinematics.
Definition: SPIAccelerometerSim.h:16
AnalogAccelerometer(int channel)
Create a new instance of an accelerometer.
double GetAcceleration() const
Return the acceleration in Gs.
A helper class for use with objects that add themselves to SendableRegistry.
Definition: SendableHelper.h:28
Definition: SendableBuilder.h:23