95  AnalogEncoder(std::shared_ptr<AnalogInput> analogInput, 
double fullRange,
 
  137  void Init(
double fullRange, 
double expectedZero);
 
  138  double MapSensorRange(
double pos) 
const;
 
  140  std::shared_ptr<AnalogInput> m_analogInput;
 
  142  double m_expectedZero;
 
  143  double m_sensorMin{0.0};
 
  144  double m_sensorMax{1.0};
 
  145  bool m_isInverted{
false};
 
 
Class for supporting continuous analog encoders, such as the US Digital MA3.
Definition AnalogEncoder.h:21
 
AnalogEncoder(std::shared_ptr< AnalogInput > analogInput, double fullRange, double expectedZero)
Construct a new AnalogEncoder attached to a specific AnalogInput.
 
AnalogEncoder(AnalogInput *analogInput, double fullRange, double expectedZero)
Construct a new AnalogEncoder attached to a specific AnalogInput.
 
AnalogEncoder(AnalogInput &analogInput, double fullRange, double expectedZero)
Construct a new AnalogEncoder attached to a specific AnalogInput.
 
void InitSendable(wpi::SendableBuilder &builder) override
Initializes this Sendable object.
 
AnalogEncoder & operator=(AnalogEncoder &&)=default
 
void SetInverted(bool inverted)
Set if this encoder is inverted.
 
AnalogEncoder(int channel, double fullRange, double expectedZero)
Construct a new AnalogEncoder attached to a specific AnalogIn channel.
 
AnalogEncoder(int channel)
Construct a new AnalogEncoder attached to a specific AnalogIn channel.
 
int GetChannel() const
Get the channel number.
 
AnalogEncoder(AnalogInput &analogInput)
Construct a new AnalogEncoder attached to a specific AnalogInput.
 
~AnalogEncoder() override
 
AnalogEncoder(AnalogInput *analogInput)
Construct a new AnalogEncoder attached to a specific AnalogInput.
 
AnalogEncoder(std::shared_ptr< AnalogInput > analogInput)
Construct a new AnalogEncoder attached to a specific AnalogInput.
 
AnalogEncoder(AnalogEncoder &&)=default
 
void SetVoltagePercentageRange(double min, double max)
Set the encoder voltage percentage range.
 
double Get() const
Get the encoder value.
 
A move-only C++ wrapper around a HAL simulator device handle.
Definition SimDevice.h:645
 
C++ wrapper around a HAL simulator double value handle.
Definition SimDevice.h:536
 
Helper class for building Sendable dashboard representations.
Definition SendableBuilder.h:21
 
A helper class for use with objects that add themselves to SendableRegistry.
Definition SendableHelper.h:21
 
Interface for Sendable objects.
Definition Sendable.h:16