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

Use this class when programming with a line follower. More...

Inherits vex::__tridevice.

Public Member Functions

 line (triport::port &port)
 Creates a new line object on the port specified in the parameter. More...
 
 ~line ()
 
int32_t value (analogUnits units)
 Gets the value of the line follower. More...
 
int32_t value (percentUnits units)
 Gets the value of the line follower. More...
 

Detailed Description

Use this class when programming with a line follower.

Constructor & Destructor Documentation

◆ line()

vex::line::line ( triport::port port)

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

Parameters
portA reference to a three wire port.

◆ ~line()

vex::line::~line ( )

Member Function Documentation

◆ value() [1/2]

int32_t vex::line::value ( analogUnits  units)

Gets the value of the line follower.

Returns
Returns an integer that represents the unit value specified by the parameter of the line follower.
Parameters
unitsThe measurement unit for the line device.

◆ value() [2/2]

int32_t vex::line::value ( percentUnits  units)
inline

Gets the value of the line follower.

Returns
Returns an integer that represents the unit value specified by the parameter of the line follower.
Parameters
unitsThe measurement unit for the line device.