WPILibC++ 2024.3.2
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 valid)
 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  valid)

Sets if the range measurement is valid.

Parameters
validTrue if valid

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