AnalogEncoderSim

class wpilib.simulation.AnalogEncoderSim(encoder: wpilib._wpilib.AnalogEncoder)

Bases: pybind11_object

Class to control a simulated analog encoder.

Constructs from an AnalogEncoder object.

Parameters:

encoder – AnalogEncoder to simulate

get() float

Get the simulated position.

set(value: SupportsFloat | SupportsIndex) None

Set the position.

Parameters:

value – The position.