pros::lcd namespace

Contents

Functions

__attribute__((weak)) bool set_text(std __attribute__((weak)) bool clear_line(std pros::lcd::__attribute__((weak))
Displays a formatted string on the emulated three-button LCD screen.
template<typename... Params>
bool pros::lcd::print(std::int16_t line, const char* fmt, Params... args)
Displays a formatted string on the emulated three-button LCD screen.
bool pros::lcd::is_initialized(void)
Checks whether the emulated three-button LCD has already been initialized.
bool pros::lcd::initialize(void)
Creates an emulation of the three-button, UART-based VEX LCD on the display.
bool pros::lcd::shutdown(void)
Turns off the Legacy LCD Emulator.
bool pros::lcd::set_text(std::int16_t line, std::string text)
Displays a string on the emulated three-button LCD screen.
bool pros::lcd::clear(void)
Clears the contents of the emulated three-button LCD screen.
bool pros::lcd::clear_line(std::int16_t line)
Clears the contents of a line of the emulated three-button LCD screen.
void pros::lcd::register_btn0_cb(lcd_btn_cb_fn_t cb)
Registers a callback function for the leftmost button.
void pros::lcd::register_btn1_cb(lcd_btn_cb_fn_t cb)
Registers a callback function for the center button.
void pros::lcd::register_btn2_cb(lcd_btn_cb_fn_t cb)
Registers a callback function for the rightmost button.
void pros::lcd::set_text_align(Text_Align alignment)
Sets the alignment to use for subsequent calls that print text to a line.
std::uint8_t pros::lcd::read_buttons(void)
Gets the button status from the emulated three-button LCD.

Enums

enum class Text_Align { LEFT = 0, CENTER = 1, RIGHT = 2 }
Represents how to align the text in the LCD.

Typedefs

using lcd_btn_cb_fn_t = void(*)(void)

Function documentation

__attribute__((weak)) bool set_text(std __attribute__((weak)) bool clear_line(std pros::lcd::__attribute__((weak))

Displays a formatted string on the emulated three-button LCD screen.

Returns True if the operation was successful, or false otherwise, setting errno values as specified above.

This function uses the following values of errno when an error state is reached: ENXIO - The LCD has not been initialized. Call lcd_initialize() first. EINVAL - The line number specified is not in the range [0-7]