VEX V5 C++ API
Public Member Functions | List of all members
vex::bumper Class Reference

Use this class when programming with the bumper device. More...

Inherits vex::__tridevice.

Public Member Functions

 bumper (triport::port &port)
 Creates a new bumper object on the port specified in the parameter. More...
 
 ~bumper ()
 
int32_t value ()
 Gets the value of the bumper device. More...
 
int32_t pressing ()
 Get the pressed status of the bumper device. More...
 
 operator int ()
 
 operator bool ()
 

Detailed Description

Use this class when programming with the bumper device.

Constructor & Destructor Documentation

◆ bumper()

vex::bumper::bumper ( triport::port port)

Creates a new bumper object on the port specified in the parameter.

Parameters
portA reference to a three wire port.

◆ ~bumper()

vex::bumper::~bumper ( )

Member Function Documentation

◆ value()

int32_t vex::bumper::value ( )

Gets the value of the bumper device.

Returns
Returns an integer that represents the value of the bumper device.

◆ pressing()

int32_t vex::bumper::pressing ( )
inline

Get the pressed status of the bumper device.

Returns
Returns the state of the bumper device. If it is pressed it will return a one. If unpressed, it will return a zero.

◆ operator int()

vex::bumper::operator int ( )

◆ operator bool()

vex::bumper::operator bool ( )