pub struct AdiEncoder { /* private fields */ }
Expand description

A struct which represents a V5 ADI port configured as an ADI encoder.

Implementations

Initializes and enables a quadrature encoder on two ADI ports.

Safety

This function is unsafe because it allows the user to create multiple mutable references to the same ADI encoder. You likely want to implement Robot::new() instead.

Resets the encoder to zero. It is safe to use this method while an encoder is enabled. It is not necessary to call this method before stopping or starting an encoder.

Gets the number of ticks recorded by the encoder. There are 360 ticks in one revolution.

Trait Implementations

Executes the destructor for this type. Read more

Converts an (AdiPort, AdiPort) into an AdiEncoder.

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.