@@ -531,15 +531,15 @@ def resolution(self, res):
531
531
self ._res_label .text = self .resolutions [res ]
532
532
self .display .refresh ()
533
533
534
- def init_display (self ):
534
+ def init_display (self , reset = board . TFT_RESET ):
535
535
"""Initialize the TFT display"""
536
536
# construct displayio by hand
537
537
displayio .release_displays ()
538
538
self ._display_bus = displayio .FourWire (
539
539
self ._spi ,
540
540
command = board .TFT_DC ,
541
541
chip_select = board .TFT_CS ,
542
- reset = board . TFT_RESET ,
542
+ reset = reset ,
543
543
baudrate = 60_000_000 ,
544
544
)
545
545
self .display = board .DISPLAY
@@ -567,7 +567,7 @@ def display_message(self, message, color=0xFF0000, scale=3):
567
567
text_area = label .Label (terminalio .FONT , text = message , color = color , scale = scale )
568
568
text_area .anchor_point = (0.5 , 0.5 )
569
569
if not self .display :
570
- self .init_display ()
570
+ self .init_display (None )
571
571
text_area .anchored_position = (self .display .width / 2 , self .display .height / 2 )
572
572
573
573
# Show it
@@ -611,7 +611,7 @@ def mount_sd_card(self):
611
611
vfs = storage .VfsFat (self .sdcard )
612
612
print ("mount vfs @" , time .monotonic () - self ._timestamp )
613
613
storage .mount (vfs , "/sd" )
614
- self .init_display ()
614
+ self .init_display (None )
615
615
self ._image_counter = 0
616
616
self ._sd_label .text = "SD OK"
617
617
self ._sd_label .color = 0x00FF00
0 commit comments