DutyCycleEncoderSim

class wpilib.simulation.DutyCycleEncoderSim(encoder: wpilib.DutyCycleEncoder)

Bases: pybind11_builtins.pybind11_object

Class to control a simulated duty cycle encoder.

Constructs from a DutyCycleEncoder object.

Parameters

dutyCycleEncoder – DutyCycleEncoder to simulate

set(turns: turns)None

Set the position tin turns.

Parameters

turns – The position.

setDistance(distance: float)None

Set the position.