14#ifndef VEX_DISTANCE_CLASS_H
15#define VEX_DISTANCE_CLASS_H
28 enum class tEventType {
29 EVENT_DISTANCE_CHANGED = 0,
86 int32_t _lastpolltimeSize;
87 int32_t _lastpolltimeVelocity;
88 int16_t _pollinterval;
90 bool pollValidSize(
bool bSave );
91 bool pollValidVelocity(
bool bSave );
Use the distance class to control the distance sensor.
bool isObjectDetected(void)
check for object in range of the distance sensor
sizeType objectSize(void)
Gets an estimate of the detected object size.
double objectDistance(distanceUnits units)
Gets the detected object distance.
distance(int32_t index)
Creates a new distance sensor object on the port specified.
int32_t objectRawSize(void)
Gets an estimate of the detected object size.
double objectVelocity(void)
Gets an estimate of the detected object velocity.
void changed(void(*callback)(void))
Calls a function when the distance value changes.
Bumper switch device class