WPILibC++ 2023.4.3
frc::sim::DutyCycleEncoderSim Class Reference

Class to control a simulated duty cycle encoder. More...

#include <frc/simulation/DutyCycleEncoderSim.h>

Public Member Functions

 DutyCycleEncoderSim (const DutyCycleEncoder &encoder)
 Constructs from a DutyCycleEncoder object. More...
 
 DutyCycleEncoderSim (int channel)
 Constructs from a digital input channel. More...
 
void Set (units::turn_t turns)
 Set the position in turns. More...
 
void SetDistance (double distance)
 Set the position. More...
 

Detailed Description

Class to control a simulated duty cycle encoder.

Constructor & Destructor Documentation

◆ DutyCycleEncoderSim() [1/2]

frc::sim::DutyCycleEncoderSim::DutyCycleEncoderSim ( const DutyCycleEncoder encoder)
explicit

Constructs from a DutyCycleEncoder object.

Parameters
encoderDutyCycleEncoder to simulate

◆ DutyCycleEncoderSim() [2/2]

frc::sim::DutyCycleEncoderSim::DutyCycleEncoderSim ( int  channel)
explicit

Constructs from a digital input channel.

Parameters
channeldigital input channel

Member Function Documentation

◆ Set()

void frc::sim::DutyCycleEncoderSim::Set ( units::turn_t  turns)

Set the position in turns.

Parameters
turnsThe position.

◆ SetDistance()

void frc::sim::DutyCycleEncoderSim::SetDistance ( double  distance)

Set the position.


The documentation for this class was generated from the following file: