Browse Source

test pattern: drop GDEx prefix from panel label

The series/generation letter (GDEY/GDEQ/...) encodes nothing we act on and
costs scarce width on small panels, so the label is now just the size+type
part of the Good Display number: GDEQ0583T31 -> 0583T31, GDEY0213Z98 ->
0213Z98.
ZiB 3 weeks ago
parent
commit
4859dad462
1 changed files with 5 additions and 4 deletions
  1. 5 4
      components/gxepd2/display.py

+ 5 - 4
components/gxepd2/display.py

@@ -72,12 +72,13 @@ MODELS = {
 }
 
 
-# Good Display part number -> shelf label: insert a dash after the 4-char GDEx
-# series prefix (GDEQ0583T31 -> GDEQ-0583T31), matching the vendor's own
-# silkscreen. The size stays encoded exactly once, inside the part number.
+# Good Display part number -> shelf label: drop the 4-char GDEx series prefix,
+# keeping just the size + type (GDEQ0583T31 -> 0583T31, GDEY0213Z98 ->
+# 0213Z98). The GDEx series/generation letter encodes nothing we act on and
+# costs scarce width on small panels; size stays encoded once, in the digits.
 # Anything not starting with GDE<letter> is returned untouched.
 def _panel_label(part: str) -> str:
-    return re.sub(r"^(GDE[A-Z])", r"\1-", part)
+    return re.sub(r"^GDE[A-Z]", "", part)
 
 CONFIG_SCHEMA = cv.All(
     display.FULL_DISPLAY_SCHEMA.extend(