Skip to content

dino, pixel_sim_demos: present the LED grid again - #138

Merged
bdbarnett merged 1 commit into
mainfrom
hk/pixel-sim-black
Sep 23, 2026
Merged

bdbarnett merged 1 commit into
mainfrom
hk/pixel-sim-black

Conversation

@bdbarnett

Copy link
Copy Markdown
Collaborator

Fixes #135. The two pixel_sim cards lost their display_drv.show() in 15f166a. That commit relied on appdev.App presenting any display with needs_refresh, but a PixelDisplay has none, and under pixel_sim the App's display is the host surface, not the LED grid. So the grid was drawn into and never flushed. This puts the one show() back in each example, with a comment saying why it has to stay.

Checked in headless Chromium from .venv, the MicroPython gallery served locally with the deployed /vendor and /assets paths: gallery/micropython.html?modules=dino and ?modules=pixel_sim_demos read 0 non-black pixels on main and 3325 / 25600 on this branch. Both keep animating (canvas hash changes between samples), and a Space press starts dino: the score counts up and cacti scroll in.

The Pyodide gallery loads examples from main on raw.githubusercontent.com, so it can only be checked after merge.

15f166a dropped display_drv.show() from examples on the grounds that
appdev.App presents every display with needs_refresh. A PixelDisplay has
no needs_refresh, and under pixel_sim it isn't the App's display at all,
so nothing ever called SimPixelFramebuffer.display() and both cards
painted a black canvas in both galleries.

Fixes #135
@bdbarnett
bdbarnett merged commit 54e6863 into main Sep 23, 2026
4 checks passed
@bdbarnett
bdbarnett deleted the hk/pixel-sim-black branch September 23, 2026 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

The two pixel_sim cards paint a black canvas in both galleries

1 participant