WPILibC++ 2023.4.3-108-ge5452e3
frc::sim::UltrasonicSim Class Reference

Class to control a simulated Ultrasonic. More...

#include <frc/simulation/UltrasonicSim.h>

Public Member Functions

 UltrasonicSim (const Ultrasonic &ultrasonic)
 Constructor. More...
 
 UltrasonicSim (int ping, int echo)
 Constructor. More...
 
void SetRangeValid (bool isValid)
 Sets if the range measurement is valid. More...
 
void SetRange (units::inch_t range)
 Sets the range measurement. More...
 

Detailed Description

Class to control a simulated Ultrasonic.

Constructor & Destructor Documentation

◆ UltrasonicSim() [1/2]

frc::sim::UltrasonicSim::UltrasonicSim ( const Ultrasonic ultrasonic)
explicit

Constructor.

Parameters
ultrasonicThe real ultrasonic to simulate

◆ UltrasonicSim() [2/2]

frc::sim::UltrasonicSim::UltrasonicSim ( int  ping,
int  echo 
)

Constructor.

Parameters
pingunused.
echothe ultrasonic's echo channel.

Member Function Documentation

◆ SetRange()

void frc::sim::UltrasonicSim::SetRange ( units::inch_t  range)

Sets the range measurement.

Parameters
rangeThe range

◆ SetRangeValid()

void frc::sim::UltrasonicSim::SetRangeValid ( bool  isValid)

Sets if the range measurement is valid.

Parameters
isValidTrue if valid

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