Class DriverStationDisplay
Line mode is the default display mode.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDriver Station display mode. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidAdds display data in line mode.static voidAdds display data in line mode.static voidAdds formatted display data in line mode.static voidaddKeyedLine(String key, String line) Adds display data in line mode, keyed by an identifier that is not displayed.static voidAdds an uncaptioned display line in line mode.static voidclearRaw()Clears the display in raw ANSI mode.static voidSets the display mode.static voidUpdates the display with all pending lines and clears the pending lines.static voidwriteRawAnsi(String data) Writes ANSI text directly to the display in raw ANSI mode.
-
Method Details
-
setMode
Sets the display mode.DriverStationDisplay.Mode.Lineis the default display mode. SettingDriverStationDisplay.Mode.Lineclears any pending display lines. SettingDriverStationDisplay.Mode.RawAnsiclears the display.- Parameters:
mode- display mode
-
addKeyedLine
Adds display data in line mode, keyed by an identifier that is not displayed.Repeated calls with the same key before
updateLines()replace the previous line. The key is used only to identify the line for replacement and is not displayed. Empty or whitespace-only keys always append a new line.- Parameters:
key- Line key.line- Line contents.
-
addData
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 displayed before the line contents, separated by " : ". Empty or whitespace-only captions always append a new line and are not displayed.- Parameters:
caption- Line caption.line- Line contents.
-
addData
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 displayed before the line contents, separated by " : ". Empty or whitespace-only captions always append a new line and are not displayed.The value is converted to text with
String.valueOf(Object).- Parameters:
caption- Line caption.value- Line value.
-
addData
Adds formatted 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 displayed before the line contents, separated by " : ". Empty or whitespace-only captions always append a new line and are not displayed.- Parameters:
caption- Line caption.format- Format string.args- Format arguments.
-
addLine
Adds an uncaptioned display line in line mode.This is equivalent to calling
addKeyedLine(String, String)with an empty key, which always appends a new line.- Parameters:
line- Line contents.
-
updateLines
public static void updateLines()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.
-
writeRawAnsi
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.
-
clearRaw
public static void clearRaw()Clears the display in raw ANSI mode.This call is ignored unless the display is in raw ANSI mode.
-