Package edu.wpi.first.wpilibj.simulation
Class DutyCycleEncoderSim
java.lang.Object
edu.wpi.first.wpilibj.simulation.DutyCycleEncoderSim
public class DutyCycleEncoderSim extends Object
Class to control a simulated duty cycle encoder.
-
Constructor Summary
Constructors Constructor Description DutyCycleEncoderSim(int channel)
Constructs from a digital input channel.DutyCycleEncoderSim(DutyCycleEncoder encoder)
Constructs from an DutyCycleEncoder object. -
Method Summary
Modifier and Type Method Description void
set(double turns)
Set the position in turns.void
setDistance(double distance)
Set the position.
-
Constructor Details
-
DutyCycleEncoderSim
Constructs from an DutyCycleEncoder object.- Parameters:
encoder
- DutyCycleEncoder to simulate
-
DutyCycleEncoderSim
Constructs from a digital input channel.- Parameters:
channel
- digital input channel.
-
-
Method Details
-
set
Set the position in turns.- Parameters:
turns
- The position.
-
setDistance
Set the position.- Parameters:
distance
- The position.
-