dino, pixel_sim_demos: present the LED grid again - #138
Merged
Merged
Conversation
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
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.
Fixes #135. The two pixel_sim cards lost their
display_drv.show()in 15f166a. That commit relied on appdev.App presenting any display withneeds_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 oneshow()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/vendorand/assetspaths:gallery/micropython.html?modules=dinoand?modules=pixel_sim_demosread 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.