pantalla#
Estos comandos solo funcionan con un controlador VEX V5 conectado al VEX EXP Brain.
imprimir()#
The controller.screen.print(text, sep, precision) method prints text on the Controller’s screen using the current cursor position.
Parámetro |
Descripción |
|---|---|
|
El texto que se imprimirá en la pantalla del controlador. |
|
Optional. A string to inset between values. This must be written as a keyword argument (sep=). The default is |
|
Optional. The number of decimal places to display when printing simple numbers. This must be written as a keyword argument( |
Devoluciones: Ninguna.
# Print the number 1 on the screen at current cursor position.
controller.screen.print(1)
# Print the numbers 1, 2, 3 and 4 on the screen at current cursor.
controller.screen.print(1, 2, 3, 4, sep='-')
# Print motor1's velocity on the screen using a format string.
controller.screen.print("motor1 : % 7.2f" %(motor1.velocity()))
establecer_cursor()#
The controller.screen.set_cursor(row, col) method sets the cursor position used for printing text on the Controller’s screen.
El controlador V5 puede mostrar como máximo 3 líneas de texto.
Parámetro |
Descripción |
|---|---|
|
La fila del cursor. 1, 2 o 3 |
|
La columna del cursor. La primera columna es 1. |
Devoluciones: Ninguna.
columna()#
The controller.screen.column() method returns the current column where text will be printed.
Devuelve: La columna actual.
fila()#
The controller.screen.row() method returns the current row where text will be printed.
Devuelve: La fila actual.
controlador.pantalla.borrar_pantalla()#
The controller.screen.clear_screen() method clears the whole screen.
Devoluciones: Ninguna.
controlador.pantalla.clear_row()#
The controller.screen.clear_row(row) method clears a screen row.
Parámetro |
Descripción |
|---|---|
|
Opcional. La fila a borrar, 1, 2 o 3, el valor predeterminado es la fila del cursor actual. |
Devoluciones: Ninguna.
# Clear row 2.
controller.screen.clear_row(2)
controlador.pantalla.siguiente_fila()#
The controller.screen.next_row() method moves the cursor to the beginning of the next row.
Devoluciones: Ninguna.