Skip to content

Commit 2e2642d

Browse files
committed
Add support for 2.8" round TURZX USB display (PID 0x0028)
Register the 2.8" round panel (480x480, USB Product ID 0x0028) with the existing TURZX USB comm class. This is the new-generation USB variant of the 2.8" screen, distinct from the older UART-based 2.1"/2.8" models. Changes: - Add PID 0x0028 to the PRODUCT_ID table in lcd_comm_turing_usb.py - Add a new size option in configure.py for the GUI dropdown - Fix a latent bug in load_config_values where .replace() on size strings could produce corrupted values like '2.1" / 2.1" / 2.8"' due to substring matching — switched to equality checks instead - Update README supported sizes list
1 parent 581e8f6 commit 2e2642d

3 files changed

Lines changed: 14 additions & 7 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Supported operating systems : macOS, Windows, Linux (incl. Raspberry Pi), basica
1919
| ✅ Turing Smart Screen / TURZX |
2020
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
2121
| <img src="res/docs/turing.webp" width="30%" height="30%"/> <img src="res/docs/turing46inch.png" width="30%" height="30%"/> <img src="res/docs/turing5inch.png" width="30%" height="30%"/> <br/> <img src="res/docs/turing2inch.webp" width="30%" height="30%"/> <img src="res/docs/turing8inch.png" width="30%" height="30%"/> <img src="res/docs/turing8inch.webp" width="30%" height="30%"/> |
22-
| All available sizes and hardware revisions supported: **2.1" / 2.8" / 3.5" / 4.6" / 5" / 5.2" / 8.0" / 8.8" / 9.2" / 12.3"** <br/>UART and USB protocols supported. Note: no video or storage support for now |
22+
| All available sizes and hardware revisions supported: **2.1" / 2.8" / 2.8" round / 3.5" / 4.6" / 5" / 5.2" / 8.0" / 8.8" / 9.2" / 12.3"** <br/>UART and USB protocols supported. Note: no video or storage support for now |
2323

2424
| ✅ XuanFang 3.5" |[UsbPCMonitor 3.5" / 5"](https://aliexpress.com/item/1005003931363455.html) | ✅ Kipye Qiye Smart Display 3.5" |
2525
|---------------------------------------------------|-----------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------|

configure.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,13 @@
7676
SIZE_8_8_INCH = "8.8\""
7777
SIZE_8_8_INCH_NEWREV = "8.8\" / 9.2\" (V1.X new HW rev.)"
7878
SIZE_12_3_INCH = "12.3\""
79+
SIZE_2_8_ROUND_USB = "2.8\" round (V1.X new HW rev.)"
7980

8081
# List of sizes that can be selected
8182
size_list = (
8283
SIZE_0_96_INCH,
8384
SIZE_2_x_INCH,
85+
SIZE_2_8_ROUND_USB,
8486
SIZE_3_5_INCH,
8587
SIZE_4_6_INCH,
8688
SIZE_5_INCH,
@@ -107,6 +109,7 @@
107109
('TUR_USB', SIZE_8_8_INCH): TURING_MODEL,
108110
('TUR_USB', SIZE_8_8_INCH_NEWREV): TURING_MODEL,
109111
('TUR_USB', SIZE_12_3_INCH): TURING_MODEL,
112+
('TUR_USB', SIZE_2_8_ROUND_USB): TURING_MODEL,
110113
('WEACT_A', SIZE_3_5_INCH): WEACT_MODEL,
111114
('WEACT_B', SIZE_0_96_INCH): WEACT_MODEL,
112115

@@ -131,6 +134,7 @@
131134
(TURING_MODEL, SIZE_8_8_INCH): 'C',
132135
(TURING_MODEL, SIZE_8_8_INCH_NEWREV): 'TUR_USB',
133136
(TURING_MODEL, SIZE_12_3_INCH): 'TUR_USB',
137+
(TURING_MODEL, SIZE_2_8_ROUND_USB): 'TUR_USB',
134138
(USBPCMONITOR_MODEL, SIZE_3_5_INCH): 'A',
135139
(USBPCMONITOR_MODEL, SIZE_5_INCH): 'A',
136140
(WEACT_MODEL, SIZE_0_96_INCH): 'WEACT_B',
@@ -433,13 +437,15 @@ def load_config_values(self):
433437

434438
# Guess display size from theme in the configuration
435439
size = get_theme_size(self.config['config']['THEME'])
436-
size = size.replace(_SIZE_2_1_INCH, SIZE_2_x_INCH) # If a theme is for 2.1" then it is for all 2.x"
437-
size = size.replace(_SIZE_2_8_INCH, SIZE_2_x_INCH) # If a theme is for 2.8" then it is for all 2.x"
438-
size = size.replace(_SIZE_9_2_INCH,
439-
SIZE_8_8_INCH_NEWREV) # If a theme is for 9.2" then it is for 8.8"/9.2" (new rev)
440+
if size == _SIZE_2_1_INCH or size == _SIZE_2_8_INCH:
441+
size = SIZE_2_x_INCH # If a theme is for 2.1" or 2.8" then it is for all 2.x"
442+
elif size == _SIZE_9_2_INCH:
443+
size = SIZE_8_8_INCH_NEWREV # If a theme is for 9.2" then it is for 8.8"/9.2" (new rev)
440444
try:
441445
if size == SIZE_8_8_INCH and self.config['display']['REVISION'] == 'TUR_USB':
442446
size = SIZE_8_8_INCH_NEWREV
447+
if size == SIZE_2_x_INCH and self.config['display']['REVISION'] == 'TUR_USB':
448+
size = SIZE_2_8_ROUND_USB
443449
self.size_cb.set(size)
444450
except:
445451
self.size_cb.current(0)
@@ -587,7 +593,7 @@ def on_size_change(self, e=None):
587593
size = self.size_cb.get()
588594

589595
# For '2.1" / 2.8"' size, search for themes of both sizes
590-
if size == SIZE_2_x_INCH:
596+
if size == SIZE_2_x_INCH or size == SIZE_2_8_ROUND_USB:
591597
themes = get_themes(_SIZE_2_1_INCH)
592598
themes += get_themes(_SIZE_2_8_INCH)
593599
# For 8.8" & 9.2" sizes, search for themes of both sizes

library/lcd/lcd_comm_turing_usb.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@
4141
VENDOR_ID = 0x1cbe
4242

4343
# Map of display supported product IDs and their respective resolution in portrait mode
44-
PRODUCT_ID = {0x0046: (320, 960), # Turing 4.6"
44+
PRODUCT_ID = {0x0028: (480, 480), # Turing 2.8" round (USB)
45+
0x0046: (320, 960), # Turing 4.6"
4546
0x0050: (720, 1280), # Turing 5.2"
4647
0x0080: (800, 1280), # Turing 8.0"
4748
0x0088: (480, 1920), # Turing 8.8"

0 commit comments

Comments
 (0)