101 void InitAccelerometer();
103 std::shared_ptr<AnalogInput> m_analogInput;
104 double m_voltsPerG = 1.0;
105 double m_zeroGVoltage = 2.5;
Handle operation of an analog accelerometer.
Definition: AnalogAccelerometer.h:24
void SetZero(double zero)
Set the voltage that corresponds to 0 G.
double GetAcceleration() const
Return the acceleration in Gs.
void SetSensitivity(double sensitivity)
Set the accelerometer sensitivity.
~AnalogAccelerometer() override=default
AnalogAccelerometer(AnalogInput *channel)
Create a new instance of Accelerometer from an existing AnalogInput.
AnalogAccelerometer(AnalogAccelerometer &&)=default
AnalogAccelerometer(int channel)
Create a new instance of an accelerometer.
void InitSendable(wpi::SendableBuilder &builder) override
Initializes this Sendable object.
AnalogAccelerometer & operator=(AnalogAccelerometer &&)=default
AnalogAccelerometer(std::shared_ptr< AnalogInput > channel)
Create a new instance of Accelerometer from an existing AnalogInput.
Definition: SendableBuilder.h:18
A helper class for use with objects that add themselves to SendableRegistry.
Definition: SendableHelper.h:19
Interface for Sendable objects.
Definition: Sendable.h:16
Definition: AprilTagFieldLayout.h:22