File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change 29
29
# imports
30
30
import time
31
31
from digitalio import Direction
32
- import adafruit_bus_device . spi_device as spi_device
32
+ from adafruit_bus_device import spi_device
33
33
import adafruit_ra8875 .registers as reg
34
34
35
35
try :
@@ -119,9 +119,7 @@ def init(self, start_on=True):
119
119
vsync_nondisp = 32
120
120
vsync_start = 23
121
121
vsync_pw = 2
122
- elif self .width == 480 and (
123
- self .height == 272 or self .height == 128 or self .height == 82
124
- ):
122
+ elif self .width == 480 and self .height in (272 , 128 , 82 ):
125
123
pixclk = reg .PCSR_PDATL | reg .PCSR_4CLK
126
124
hsync_nondisp = 10
127
125
hsync_start = 8
@@ -483,8 +481,7 @@ def txt_size(self, scale):
483
481
:param byte scale: The the size to scale the Text to
484
482
"""
485
483
self ._txt_mode ()
486
- if scale > 3 :
487
- scale = 3
484
+ scale = min (scale , 3 )
488
485
self ._write_data ((self ._read_reg (reg .FNCR1 ) & ~ (0xF )) | (scale << 2 ) | scale )
489
486
self ._txt_scale = scale
490
487
You can’t perform that action at this time.
0 commit comments