DriverStationDisplay
- class wpilib.DriverStationDisplay
Bases:
pybind11_objectProvides access to the Driver Station display.
Line mode is the default display mode.
- class Mode(value: SupportsInt | SupportsIndex)
Bases:
pybind11_objectDriver Station display mode.
Members:
LINE : Display line mode. This is the default display mode.
RAW_ANSI : Raw ANSI text mode.
- LINE = <Mode.LINE: 0>
- RAW_ANSI = <Mode.RAW_ANSI: 1>
- DriverStationDisplay.Mode.name -> str
- property value
- static add_data(caption: str, line: str) None
Adds display data in line mode.
Repeated calls with the same caption before UpdateLines() replace the previous line. The caption is used to identify the line and is not displayed. Empty or whitespace-only captions always append a new line.
- Parameters:
caption – Line caption.
line – Line contents.
- static add_line(line: str) None
Adds an uncaptioned display line in line mode.
This is equivalent to calling AddData() with an empty caption, which always appends a new line.
- Parameters:
line – Line contents.
- static clear_raw() None
Clears the display in raw ANSI mode.
This call is ignored unless the display is in raw ANSI mode.
- static set_mode(mode: wpilib._wpilib.DriverStationDisplay.Mode) None
Sets the display mode.
Mode::Line is the default display mode. Setting Mode::Line clears any pending display lines. Setting Mode::RawAnsi clears the display.
- Parameters:
mode – display mode
- static update_lines() None
Updates the display with all pending lines and clears the pending lines.
Updates are sent at most once every 230 ms. If called before 230 ms has elapsed since the last update, the pending lines are cleared without sending.
- static write_raw_ansi(data: str) None
Writes ANSI text directly to the display in raw ANSI mode.
This call is ignored unless the display is in raw ANSI mode.
- Parameters:
data – ANSI text to write.