Skip to content

Commit 9c7a5a9

Browse files
committed
Support Turing Smart Display 8.8" V1.1
1 parent f3a3c07 commit 9c7a5a9

File tree

3 files changed

+354
-1
lines changed

3 files changed

+354
-1
lines changed

configure.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,12 @@
6666
SIZE_3_5_INCH = "3.5\""
6767
SIZE_5_INCH = "5\""
6868
SIZE_8_8_INCH = "8.8\""
69+
SIZE_8_8_INCH_USB = "8.8\" (V1.1)"
6970
SIZE_2_1_INCH = "2.1\"" # Only for retro compatibility
7071
SIZE_2_x_INCH = "2.1\" / 2.8\""
7172
SIZE_0_96_INCH = "0.96\""
7273

73-
size_list = (SIZE_0_96_INCH, SIZE_2_x_INCH, SIZE_3_5_INCH, SIZE_5_INCH, SIZE_8_8_INCH)
74+
size_list = (SIZE_0_96_INCH, SIZE_2_x_INCH, SIZE_3_5_INCH, SIZE_5_INCH, SIZE_8_8_INCH, SIZE_8_8_INCH_USB)
7475

7576
# Maps between config.yaml values and GUI description
7677
revision_and_size_to_model_map = {
@@ -80,6 +81,7 @@
8081
('C', SIZE_2_x_INCH): TURING_MODEL,
8182
('C', SIZE_5_INCH): TURING_MODEL,
8283
('C', SIZE_8_8_INCH): TURING_MODEL,
84+
('C_USB', SIZE_8_8_INCH_USB): TURING_MODEL,
8385
('D', SIZE_3_5_INCH): KIPYE_MODEL,
8486
('WEACT_A', SIZE_3_5_INCH): WEACT_MODEL,
8587
('WEACT_B', SIZE_0_96_INCH): WEACT_MODEL,
@@ -97,6 +99,7 @@
9799
(TURING_MODEL, SIZE_2_x_INCH): 'C',
98100
(TURING_MODEL, SIZE_5_INCH): 'C',
99101
(TURING_MODEL, SIZE_8_8_INCH): 'C',
102+
(TURING_MODEL, SIZE_8_8_INCH_USB): 'C_USB',
100103
(KIPYE_MODEL, SIZE_3_5_INCH): 'D',
101104
(WEACT_MODEL, SIZE_3_5_INCH): 'WEACT_A',
102105
(WEACT_MODEL, SIZE_0_96_INCH): 'WEACT_B',
@@ -383,6 +386,8 @@ def load_config_values(self):
383386
size = get_theme_size(self.config['config']['THEME'])
384387
size = size.replace(SIZE_2_1_INCH, SIZE_2_x_INCH) # If a theme is for 2.1" then it also is for 2.8"
385388
try:
389+
if size == SIZE_8_8_INCH and self.config['display']['REVISION'] == 'C_USB':
390+
size = SIZE_8_8_INCH_USB
386391
self.size_cb.set(size)
387392
except:
388393
self.size_cb.current(0)

library/display.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
from library.lcd.lcd_comm_rev_a import LcdCommRevA
2424
from library.lcd.lcd_comm_rev_b import LcdCommRevB
2525
from library.lcd.lcd_comm_rev_c import LcdCommRevC
26+
from library.lcd.lcd_comm_rev_c_usb import LcdCommRevCUSB
2627
from library.lcd.lcd_comm_rev_d import LcdCommRevD
2728
from library.lcd.lcd_comm_weact_a import LcdCommWeActA
2829
from library.lcd.lcd_comm_weact_b import LcdCommWeActB
@@ -85,6 +86,9 @@ def __init__(self):
8586
# Because of issue with Turing rev. C size auto-detection, manually configure screen width/height from theme
8687
self.lcd = LcdCommRevC(com_port=config.CONFIG_DATA['config']['COM_PORT'],
8788
update_queue=config.update_queue, display_width=width, display_height=height)
89+
elif config.CONFIG_DATA["display"]["REVISION"] == "C_USB":
90+
# Because of issue with Turing rev. C size auto-detection, manually configure screen width/height from theme
91+
self.lcd = LcdCommRevCUSB(display_width=width, display_height=height)
8892
elif config.CONFIG_DATA["display"]["REVISION"] == "D":
8993
self.lcd = LcdCommRevD(com_port=config.CONFIG_DATA['config']['COM_PORT'],
9094
update_queue=config.update_queue)

0 commit comments

Comments
 (0)