Fix ST7735 128×128 display: correct color order and add UI scaling#341
Draft
Fix ST7735 128×128 display: correct color order and add UI scaling#341
Conversation
- New ST7735.py driver with full init sequence, offsets, lazy init, SPI_NO_CS - Updated display_driver.py factory with ST7735 type - Added st7735_128x128 and desktop_128x128 display configurations - Updated renderer.py to handle ST7735 (same canvas orientation as ST7789) - 7 new tests for ST7735 driver (dimensions, SPI, lazy init, SLPOUT timing) - Updated docs/io_config.md with 1.44" HAT documentation Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>
…lution independence - QRDisplayScreen now uses renderer.canvas_width/height instead of 240, 240 - Keyboard default rect now computed from Renderer dimensions instead of hardcoded (0,40,240,240) Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for 1.44 inch LCD HAT display driver Add Waveshare 1.44" LCD HAT support (ST7735S, 128×128) Mar 20, 2026
Owner
| Test build for pi0 here https://github.com/3rdIteration/seedsigner/actions/runs/23352787788 |
- ST7735.py: Change MADCTL from 0x60 to 0x68 (add BGR bit) to fix red/blue channel swap that caused orange buttons to appear blue - renderer.py: Render UI at 240x240 (native design resolution) and downscale to 128x128 for the ST7735 display, so all UI elements are properly scaled instead of being clipped Agent-Logs-Url: https://github.com/3rdIteration/seedsigner/sessions/570ee10b-35d2-41d6-a050-f7000f5a7992 Co-authored-by: 3rdIteration <2230318+3rdIteration@users.noreply.github.com>
Copilot AI changed the title Add Waveshare 1.44" LCD HAT support (ST7735S, 128×128) Fix ST7735 128×128 display: correct color order and add UI scaling Mar 27, 2026
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.
Description
The ST7735S 128×128 display (Waveshare 1.44" LCD HAT) has two issues: colors are wrong (orange renders as blue) and UI elements are unscaled (designed for 240×240, drawn raw into 128×128).
Color fix (
ST7735.py): MADCTL0x60→0x68. The ST7735S panel has BGR sub-pixel order; without the BGR bit (0x08), red and blue channels are swapped.Scaling fix (
renderer.py): The ST7735 canvas is now 240×240 (the UI's native design resolution) instead of 128×128. A new_resize_for_display()helper downscales via LANCZOS before sending to the physical display. This is a no-op for displays where canvas == physical size.No screenshots from physical hardware — this requires an ST7735 HAT to verify. The before state is the photo in the issue.
This pull request is categorized as a:
Checklist
pytestand made sure all unit tests pass before sumbitting the PRIf you modified or added functionality/workflow, did you add new unit tests?
I have tested this PR on the following platforms/os:
💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.