Fang-Robotics-MCB
Fang Robotics Team Codebase
Loading...
Searching...
No Matches
tap::encoder::EncoderInterface Class Referenceabstract

#include <encoder_interface.hpp>

Inheritance diagram for tap::encoder::EncoderInterface:

Public Member Functions

virtual void initialize ()=0
 
virtual bool isOnline () const =0
 
virtual void resetEncoderValue ()=0
 
virtual tap::algorithms::WrappedFloat getPosition () const =0
 
virtual float getVelocity () const =0
 
virtual void alignWith (EncoderInterface *other)=0
 

Member Function Documentation

◆ alignWith()

virtual void tap::encoder::EncoderInterface::alignWith ( EncoderInterface other)
pure virtual

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.

Implemented in tap::encoder::MultiEncoder< COUNT >, tap::encoder::MultiEncoder< 2 >, tap::encoder::MultiEncoder< 3 >, and tap::encoder::WrappedEncoder.

◆ getPosition()

virtual tap::algorithms::WrappedFloat tap::encoder::EncoderInterface::getPosition ( ) const
pure virtual

Gets the current position of the encoder, in a wrapped float on the range [0, M_TWOPI)

Implemented in tap::encoder::MultiEncoder< COUNT >, tap::encoder::MultiEncoder< 2 >, tap::encoder::MultiEncoder< 3 >, and tap::encoder::WrappedEncoder.

◆ getVelocity()

virtual float tap::encoder::EncoderInterface::getVelocity ( ) const
pure virtual

Gets the current velocity reported by the encoder. Returned in a value of radians / second

Implemented in tap::encoder::MultiEncoder< COUNT >, tap::encoder::MultiEncoder< 2 >, tap::encoder::MultiEncoder< 3 >, tap::encoder::WrappedEncoder, and tap::motor::DjiMotorEncoder.

◆ initialize()

virtual void tap::encoder::EncoderInterface::initialize ( )
pure virtual

◆ isOnline()

virtual bool tap::encoder::EncoderInterface::isOnline ( ) const
pure virtual

Returns true when the encoder is online and reporting valid values.

Implemented in tap::encoder::MultiEncoder< COUNT >, tap::encoder::MultiEncoder< 2 >, tap::encoder::MultiEncoder< 3 >, and tap::motor::DjiMotorEncoder.

◆ resetEncoderValue()

virtual void tap::encoder::EncoderInterface::resetEncoderValue ( )
pure virtual

Zeros the encoder to its current position. All encoder positions will be based from this position.

Implemented in tap::encoder::MultiEncoder< COUNT >, tap::encoder::MultiEncoder< 2 >, tap::encoder::MultiEncoder< 3 >, and tap::encoder::WrappedEncoder.


The documentation for this class was generated from the following file: