modelTextIcon8x32
Extends from Internal.Devices.PartialTextDisplay (Behaviour of the large text screens: each message received through displayLink is written under the last written line, the screen scrolls up once full).
Information
Base class generated by make_text_icons.py (folder tools/ of the repository) - do not edit by hand: change the script and run it again. Icon of a 8-line, 32-column text screen: cell k shows the character whose ASCII code is textCode[k], line i, column j being k = (i - 1)*32 + j. It extends Internal.Devices.PartialTextDisplay, which declares the array and fills it: the names of a DynamicSelect are resolved in the class that carries the icon, so the array must be in scope here (declared by a sibling base class, it is not found and the screen stays empty in replay).
Same technique as Internal.Icons.TwoLineTextIcon (a String is not stored in the results, an Integer is) and same tolerant comparison (abs(code - N) < 0.5, robust to the interpolation of the replay). Character set: space, digits, letters and ! " # & ' ( ) * + , - . / : < = > ? _; any other character is shown as a space.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | nLines (from PartialTextDisplay) | Number of lines of the screen - fixed by the extending display, consistent with its generated icon | |
| Boolean | logReceived (from PartialTextDisplay) | true | Also write each received message in the simulation log (turn off when several displays share the same link, to avoid duplicate lines) |
| Integer | nCols (from PartialTextDisplay) | Interfaces.TEXT_DISPLAY_COLS | Number of columns |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Interfaces.DisplayLinkInput | displayLink (from PartialTextDisplay) | To be connected to MCU.Display0 (connect(mcu.Display0, display.displayLink)) |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Integer[nLines*nCols] | textCode (from PartialTextDisplay) | ASCII codes shown on the icon, line after line: line i, column j at index (i - 1)*nCols + j | |
| Integer | filled (from PartialTextDisplay) | Number of lines written so far (at most nLines) |