|
Fang-Robotics-MCB
Fang Robotics Team Codebase
|
#include <encoder_interface.hpp>

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 |
|
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.
|
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.
|
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.
|
pure virtual |
Initialize the encoder. For instance: attaching a can receiver.
Implemented in tap::encoder::MultiEncoder< COUNT >, tap::encoder::MultiEncoder< 2 >, tap::encoder::MultiEncoder< 3 >, tap::encoder::WrappedEncoder, and tap::motor::DjiMotorEncoder.
|
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.
|
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.