|
26 | 26 | try:
|
27 | 27 | from typing import Optional, Tuple
|
28 | 28 |
|
| 29 | + import busdisplay |
29 | 30 | from fontio import FontProtocol
|
30 | 31 | except ImportError:
|
31 | 32 | pass
|
@@ -72,7 +73,7 @@ def __init__(
|
72 | 73 | text_scale: int = 1,
|
73 | 74 | font: Optional[FontProtocol] = None,
|
74 | 75 | colors: Optional[Tuple[Tuple[int, int, int], ...]] = None,
|
75 |
| - display: Optional[displayio.Display] = None, |
| 76 | + display: Optional[busdisplay.BusDisplay] = None, |
76 | 77 | ) -> None:
|
77 | 78 | """Display lines of text on a display using displayio. Lines of text are created in order as
|
78 | 79 | shown in the example below. If you skip a number, the line will be shown blank on the
|
@@ -107,9 +108,9 @@ def __init__(
|
107 | 108 | library. For example, if you import the library as
|
108 | 109 | ``from adafruit_simple_text_display import SimpleTextDisplay``, you can indicate the
|
109 | 110 | colors as follows: ``colors=(SimpleTextDisplay.WHITE, SimpleTextDisplay.RED)``.
|
110 |
| - :param ~displayio.Display|None display: The display object. Defaults to assuming a built-in |
111 |
| - display. To use with an external display, instantiate the display object and provide it |
112 |
| - here. Defaults to ``board.DISPLAY``. |
| 111 | + :param ~busdisplay.BusDisplay|None display: The display object. Defaults to assuming |
| 112 | + a built-in display. To use with an external display, instantiate the display |
| 113 | + object and provide it here. Defaults to ``board.DISPLAY``. |
113 | 114 |
|
114 | 115 | This example displays two lines with temperature data in C and F on the display.
|
115 | 116 | Remember to call `show()` after the list to update the display.
|
|
0 commit comments