VEX V5 C++ API
|
Use this class when programming with a sonar sensor. More...
Inherits vex::__tridevice.
Public Member Functions | |
sonar (triport::port &port) | |
Creates a new sonar object on the port specified in the parameter. More... | |
~sonar () | |
int32_t | value () |
Gets the value of the distance sensor. More... | |
operator int () | |
double | distance (distanceUnits units) |
Gets the value of the distance sensor. More... | |
Use this class when programming with a sonar sensor.
vex::sonar::sonar | ( | triport::port & | port | ) |
Creates a new sonar object on the port specified in the parameter.
port | A reference to a three wire port. |
vex::sonar::~sonar | ( | ) |
int32_t vex::sonar::value | ( | ) |
Gets the value of the distance sensor.
vex::sonar::operator int | ( | ) |
double vex::sonar::distance | ( | distanceUnits | units | ) |
Gets the value of the distance sensor.
units | The measurement unit for the sonar device. |