Add Rev C 11.3" panel support (ShinySnake G600 / TURZX) - #1059
Open
DougBeney wants to merge 3 commits into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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):
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