VEX V5 C++ API
|
Use the distance class to control the distance sensor. More...
Inherits vex::device.
Public Member Functions | |
distance (int32_t index) | |
Creates a new distance sensor object on the port specified. More... | |
~distance () | |
bool | installed () |
int32_t | value () |
double | objectDistance (distanceUnits units) |
Gets the detected object distance. More... | |
sizeType | objectSize (void) |
Gets an estimate of the detected object size. More... | |
int32_t | objectRawSize (void) |
Gets an estimate of the detected object size. More... | |
double | objectVelocity (void) |
Gets an estimate of the detected object velocity. More... | |
bool | isObjectDetected (void) |
Check for object in range of the distance sensor. More... | |
![]() | |
device () | |
device (int32_t index) | |
~device () | |
V5_DeviceType | type () |
void | init (int32_t index) |
Additional Inherited Members | |
![]() | |
int32_t | _index |
Use the distance class to control the distance sensor.
vex::distance::distance | ( | int32_t | index | ) |
Creates a new distance sensor object on the port specified.
index | The port index for this sensor. The index is zero-based. |
vex::distance::~distance | ( | ) |
|
virtual |
Reimplemented from vex::device.
|
virtual |
Reimplemented from vex::device.
double vex::distance::objectDistance | ( | distanceUnits | units | ) |
Gets the detected object distance.
units | The measurement unit for the distance sensor. |
sizeType vex::distance::objectSize | ( | void | ) |
Gets an estimate of the detected object size.
int32_t vex::distance::objectRawSize | ( | void | ) |
Gets an estimate of the detected object size.
double vex::distance::objectVelocity | ( | void | ) |
Gets an estimate of the detected object velocity.
bool vex::distance::isObjectDetected | ( | void | ) |
Check for object in range of the distance sensor.