pros::adi::Encoder class

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.