Encoder
Represents a motor or external encoder that takes in suppliers of position and velocity to calculate encoder ticks. The velocity methods of this class have been adjusted to include acceleration and corrected velocity receivers.
This class uses an internal accumulator to determine the current position of the encoder, allowing for the current position to be asserted by the end user.
Author
Lucas Bubner, 2024
Since
4.0.0
See also
Raw Encoder
RawEncoder - used in drivebases and for RoadRunner
Constructors
Properties
Functions
Link copied to clipboard
Link copied to clipboard
Gets the current encoder velocity while also correcting for velocity overflow (REV hardware limitation workaround)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Set a new Low Pass filter gain for use with acceleration estimation readings.
Link copied to clipboard
Sets the current (known) position of the encoder to this value.
Link copied to clipboard
Set a supplier that will be used to auto-set encoder direction.
Link copied to clipboard
Call to use encoder overflow (exceeding 32767 ticks/sec) correction on getVelocity.