Template Class MultiEncoder¶
Defined in File multi_encoder.hpp
Inheritance Relationships¶
Base Type¶
public tap::encoder::EncoderInterface(Class EncoderInterface)
Class Documentation¶
-
template<uint32_t COUNT>
class MultiEncoder : public tap::encoder::EncoderInterface¶ A way to combine multiple encoders into one functional unit. The first encoder in the array must not be null, as it is the primary encoder. All other values can be null. This encoder uses the primary encoder as an initial source of truth. This allows the other encoders to align themselves to it, and then have the primary encoder disconnect with the system still working. This encoder is not valid until the primary encoder comes online, and stays online until either all synced encoders disconnect, or the primary encoder is offline and no other encoders have been synced. The positions returned by this encoder are averaged between all synced and online encoders.
Public Functions
-
inline MultiEncoder(std::array<EncoderInterface*, COUNT> encoders)¶
-
inline virtual void initialize() override¶
-
inline virtual bool isOnline() const override¶
-
inline virtual tap::algorithms::WrappedFloat getPosition() const override¶
-
inline virtual float getVelocity() const override¶
-
inline virtual void resetEncoderValue() override¶
-
inline virtual void alignWith(EncoderInterface *other) override¶
-
inline MultiEncoder(std::array<EncoderInterface*, COUNT> encoders)¶