|
VEX IQ C++ API
|
Sonar sensor device class. More...
Inherits vex::device.
Public Member Functions | |
| sonar (int32_t index) | |
| Creates a new sonar sensor object on the port specified in the parameter. More... | |
| ~sonar () | |
| void | setMaximum (float distance, distanceUnits units) |
| Sets the maximum distance (default 2.5m) More... | |
| float | distance (distanceUnits units) |
| Gets the value of the sonar sensor. More... | |
Public Member Functions inherited from vex::device | |
| device (int32_t index) | |
| ~device () | |
Additional Inherited Members | |
Protected Attributes inherited from vex::device | |
| int32_t | _index |
Sonar sensor device class.
|
inline |
Creates a new sonar sensor object on the port specified in the parameter.
| index | to the brain port. |
|
inline |
| void vex::sonar::setMaximum | ( | float | distance, |
| distanceUnits | units | ||
| ) |
Sets the maximum distance (default 2.5m)
| distance | Maximum distance to be measured in units |
| units | The measurement unit for the sonar device. |
| float vex::sonar::distance | ( | distanceUnits | units | ) |
Gets the value of the sonar sensor.
| units | The measurement unit for the sonar device. |
1.8.15