class
#include <pros/adi.hpp>
Encoder
Constructors, destructors, conversion operators
- Encoder(std::uint8_t adi_port_top, std::uint8_t adi_port_bottom, bool reversed = false) explicit
- Configures a set of ADI ports to act as an Encoder.
-
Encoder(ext_
adi_ port_ tuple_ t port_tuple, bool reversed = false) explicit - Configures a set of ADI ports on an adi_expander to act as an Encoder.
Public functions
- std::int32_t reset() const
- Sets the encoder value to zero.
- std::int32_t get_value() const
- Gets the number of ticks recorded by the encoder.
-
ext_
adi_ port_ tuple_ t get_port() const override - Gets the port of the sensor.
Friends
-
std::ostream& operator<<(std::ostream& os,
pros::
adi:: Encoder& encoder) - This is the overload for the << operator for printing to streams.