Class EncoderInterface¶
Defined in File encoder_interface.hpp
Inheritance Relationships¶
Derived Types¶
public tap::encoder::MultiEncoder< 2 >(Template Class MultiEncoder)public tap::encoder::MultiEncoder< 3 >(Template Class MultiEncoder)public tap::encoder::MultiEncoder< COUNT >(Template Class MultiEncoder)public tap::encoder::WrappedEncoder(Class WrappedEncoder)
Class Documentation¶
-
class EncoderInterface¶
Subclassed by tap::encoder::MultiEncoder< 2 >, tap::encoder::MultiEncoder< 3 >, tap::encoder::MultiEncoder< COUNT >, tap::encoder::WrappedEncoder
Public Functions
-
virtual void initialize() = 0¶
Initialize the encoder. For instance: attaching a can receiver.
-
virtual bool isOnline() const = 0¶
Returns true when the encoder is online and reporting valid values.
-
virtual void resetEncoderValue() = 0¶
Zeros the encoder to its current position. All encoder positions will be based from this position.
-
virtual tap::algorithms::WrappedFloat getPosition() const = 0¶
Gets the current position of the encoder, in a wrapped float on the range [0, M_TWOPI)
-
virtual float getVelocity() const = 0¶
Gets the current velocity reported by the encoder. Returned in a value of radians / second
-
virtual void alignWith(EncoderInterface *other) = 0¶
Aligns this encoder to another encoder so that their positions are equal. If the two encoders are mechanically linked, they would then continue to report the same position.
-
virtual void initialize() = 0¶