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

Use this class to write to the controller's LCD screen. More...

Public Member Functions

 lcd ()
 
 lcd (controller *parent)
 
 ~lcd ()
 
void setCursor (int32_t row, int32_t col)
 Sets the cursor to the row and column number set in the parameters. More...
 
template<class T >
void print (T value)
 Prints a number, string, or boolean. Note that text can only be sent to the controller every 50ms (wireless) or 10ms (tethered) More...
 
void print (const char *format,...)
 Prints a formatted text string. Note that text can only be sent to the controller every 50ms (wireless) or 10ms (tethered) More...
 
void print (char *format,...)
 
void clearScreen (void)
 Clears the controller's LCD screen. Note that screen commands can only be sent to the controller every 50ms (wireless) or 10ms (tethered) More...
 
void clearLine (int number)
 Clears the line specified by the parameter. Note that screen commands can only be sent to the controller every 50ms (wireless) or 10ms (tethered) More...
 
void clearLine (void)
 Clears the current line. Note that screen commands can only be sent to the controller every 50ms (wireless) or 10ms (tethered) More...
 
void newLine (void)
 Moves the cursor to the next line. More...
 

Detailed Description

Use this class to write to the controller's LCD screen.

Constructor & Destructor Documentation

◆ lcd() [1/2]

vex::controller::lcd::lcd ( )

◆ lcd() [2/2]

vex::controller::lcd::lcd ( controller parent)

◆ ~lcd()

vex::controller::lcd::~lcd ( )
inline

Member Function Documentation

◆ setCursor()

void vex::controller::lcd::setCursor ( int32_t  row,
int32_t  col 
)

Sets the cursor to the row and column number set in the parameters.

Parameters
rowSets the row number for where the cursor is placed, range 1 to 3.
colSets the column number for where the cursor is placed, starting at 1.

◆ print() [1/3]

template<class T >
void vex::controller::lcd::print ( value)
inline

Prints a number, string, or boolean. Note that text can only be sent to the controller every 50ms (wireless) or 10ms (tethered)

Parameters
valueInformation to display on the screen.

◆ print() [2/3]

void vex::controller::lcd::print ( const char *  format,
  ... 
)

Prints a formatted text string. Note that text can only be sent to the controller every 50ms (wireless) or 10ms (tethered)

Parameters
formatThis is a reference to a char format that prints the value of variables.
...A variable list of parameters to insert into format string.

◆ print() [3/3]

void vex::controller::lcd::print ( char *  format,
  ... 
)

◆ clearScreen()

void vex::controller::lcd::clearScreen ( void  )

Clears the controller's LCD screen. Note that screen commands can only be sent to the controller every 50ms (wireless) or 10ms (tethered)

◆ clearLine() [1/2]

void vex::controller::lcd::clearLine ( int  number)

Clears the line specified by the parameter. Note that screen commands can only be sent to the controller every 50ms (wireless) or 10ms (tethered)

Parameters
numberThe line number to be cleared. In range 1 to 3.

◆ clearLine() [2/2]

void vex::controller::lcd::clearLine ( void  )

Clears the current line. Note that screen commands can only be sent to the controller every 50ms (wireless) or 10ms (tethered)

◆ newLine()

void vex::controller::lcd::newLine ( void  )

Moves the cursor to the next line.