Skip to content

Add Rev C 11.3" panel support (ShinySnake G600 / TURZX) - #1059

Open
DougBeney wants to merge 3 commits into
mathoudebine:mainfrom
DougBeney:feature/rev-c-11-3-inch-shinysnake
Open

Add Rev C 11.3" panel support (ShinySnake G600 / TURZX)#1059
DougBeney wants to merge 3 commits into
mathoudebine:mainfrom
DougBeney:feature/rev-c-11-3-inch-shinysnake

Conversation

@DougBeney

Copy link
Copy Markdown

Added support to the not so common 11.3" TURZX panel. This panel ships with and is sold separately with the Shiny Snake G600 Compact MATX Case which I recently purchased.

Driver (library/lcd/lcd_comm_rev_c.py):

  • Add Rev113Geometry: the 11.3" glass is 440x1920, but the vendor's C8 wire canvas is a fixed 1760x480 (a reshape of the same pixels, not a different resolution). Every other Rev C size's C8 canvas matches its glass directly, so this is the only size that needs it.
  • Add a dedicated full-frame send path (_display_full_113inch / _write_113inch_c8_body / _wait_113inch_full_png_success) for the panel's non-standard sequence: sent twice, ACK'd with the ASCII string "full_png_sucess", chunked in 25KB writes (a single ~3.4MB write was silently truncated by the OS tty buffer).
  • Add partial-update coordinate mapping (_map_113inch_view_to_glass / _generate_update_image_113inch) for the same reshape.
  • Fix the HELLO read size (23 -> 64 bytes): the 11.3" ID string is 24 chars and was being truncated, corrupting ROM-version detection and causing the wrong BGR/BGRA pixel format to be selected.
  • Fix DisplayPILImage to scale rather than hard-crop full-frame images borrowed from 8.8" themes (480 wide vs our 440) -- confirmed on hardware as lost content on the right edge.
  • Hold update_queue_mutex around the full-frame multi-command sequence to fix a header/body ordering race that only appears when a real update_queue is present (main.py), not in standalone scripts.
  • Skip the firmware RESTART in Reset() for this panel (unvalidated, unnecessary for a clean start), gated on the theme-declared size so every other panel's reset sequence is untouched.

App wiring: configure.py GUI entry, display.py's theme-size table, config.yaml docs, README, simple-program.py log message.

Themes: add pre-scaled 11.3" ports of Gradient and Cyberpunk 2077 Vertical (X/WIDTH/FONT_SIZE scaled by 440/480, background LANCZOS- resized).

Tests: add TestLcdCommRevC113 covering HELLO parsing, full-frame packing/reshape, partial-update mapping, and the queue-ordering regression.

note: 6 pre-existing TestLcdCommRevC golden-fixture failures, confirmed present on main before this branch (in fact this branch incidentally fixes 8 of the 9 that previously crashed outright); unrelated to 11.3

Dougie Beney added 3 commits August 18, 2026 20:43
Driver (library/lcd/lcd_comm_rev_c.py):
- Add Rev113Geometry: the 11.3" glass is 440x1920, but the vendor's C8
  wire canvas is a fixed 1760x480 (a reshape of the same pixels, not
  a different resolution). Every other Rev C size's C8 canvas matches
  its glass directly, so this is the only size that needs it.
- Add a dedicated full-frame send path (_display_full_113inch /
  _write_113inch_c8_body / _wait_113inch_full_png_success) for the
  panel's non-standard sequence: sent twice, ACK'd with the ASCII
  string "full_png_sucess", chunked in 25KB writes (a single ~3.4MB
  write was silently truncated by the OS tty buffer).
- Add partial-update coordinate mapping (_map_113inch_view_to_glass /
  _generate_update_image_113inch) for the same reshape.
- Fix the HELLO read size (23 -> 64 bytes): the 11.3" ID string is 24
  chars and was being truncated, corrupting ROM-version detection and
  causing the wrong BGR/BGRA pixel format to be selected.
- Fix DisplayPILImage to scale rather than hard-crop full-frame images
  borrowed from 8.8" themes (480 wide vs our 440) -- confirmed on
  hardware as lost content on the right edge.
- Hold update_queue_mutex around the full-frame multi-command sequence
  to fix a header/body ordering race that only appears when a real
  update_queue is present (main.py), not in standalone scripts.
- Skip the firmware RESTART in Reset() for this panel (unvalidated,
  unnecessary for a clean start), gated on the theme-declared size so
  every other panel's reset sequence is untouched.

App wiring: configure.py GUI entry, display.py's theme-size table,
config.yaml docs, README, simple-program.py log message.

Themes: add pre-scaled 11.3" ports of Gradient and Cyberpunk 2077
Vertical (X/WIDTH/FONT_SIZE scaled by 440/480, background LANCZOS-
resized).

Tests: add TestLcdCommRevC113 covering HELLO parsing, full-frame
packing/reshape, partial-update mapping, and the queue-ordering
regression.

note: 6 pre-existing TestLcdCommRevC golden-fixture failures,
confirmed present on main before this branch (in fact this branch incidentally fixes 8 of the 9 that previously crashed outright); unrelated to 11.3
…added __init__ pre-seeds

write_timeout was set once in __init__, so it was lost every time
WriteLine/ReadData reopened the port on SerialException - exactly the
USB-drop case a 20s timeout exists for. Move it into an openSerial()
override gated on _subrevision_from_size(), so reconnects keep it.

Drop self.rom_version = 87 and self.sub_revision = _subrevision_from_size()
from __init__. Every caller runs InitializeComm() which calls _hello()
before anything reads either attribute, and _hello() assigns both on every
branch, so the seeded values were never observed. Their only real effect
was keeping upstream's TestLcdCommRevC from erroring; that suite has been
broken since 8c26266 and no CI workflow runs it.

Rename _last_status_ts -> _last_status_ts_113inch: it's the 0xcf poll
throttle timestamp, read only under REV_113INCH, and was the one
11.3"-only member in the file not marked as such.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant