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 2929# imports
3030import time
3131from digitalio import Direction
32- import adafruit_bus_device . spi_device as spi_device
32+ from adafruit_bus_device import spi_device
3333import adafruit_ra8875 .registers as reg
3434
3535try :
@@ -119,9 +119,7 @@ def init(self, start_on=True):
119119 vsync_nondisp = 32
120120 vsync_start = 23
121121 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 ):
125123 pixclk = reg .PCSR_PDATL | reg .PCSR_4CLK
126124 hsync_nondisp = 10
127125 hsync_start = 8
@@ -483,8 +481,7 @@ def txt_size(self, scale):
483481 :param byte scale: The the size to scale the Text to
484482 """
485483 self ._txt_mode ()
486- if scale > 3 :
487- scale = 3
484+ scale = min (scale , 3 )
488485 self ._write_data ((self ._read_reg (reg .FNCR1 ) & ~ (0xF )) | (scale << 2 ) | scale )
489486 self ._txt_scale = scale
490487
You can’t perform that action at this time.
0 commit comments