SharpIRSim
- class wpilib.simulation.SharpIRSim(*args, **kwargs)
Bases:
pybind11_objectSimulation class for Sharp IR sensors.
Overloaded function.
__init__(self: wpilib.simulation._simulation.SharpIRSim, sharpIR: wpilib._wpilib.SharpIR) -> None
Constructor.
- Parameters:
sharpIR – The real sensor to simulate
__init__(self: wpilib.simulation._simulation.SharpIRSim, channel: typing.SupportsInt | typing.SupportsIndex) -> None
Constructor.
- Parameters:
channel – Analog channel for this sensor
- setRange(range: wpimath.units.meters) → None
Set the range returned by the distance sensor.
- Parameters:
range – range of the target returned by the sensor