Repository navigation
Conversation
Basic div-based 2D render of the SenseHAT LED matrix. Pixel state needs lifting to AstroPiModel so that it can be shared between both 2D and 3D renderers.
Correctly use the pre-computed indexes passed into `sense_hat_emit` to rotate the 2D grid.
G3zz
temporarily deployed
to
previews/1719/merge
October 30, 2026 14:14 — with
GitHub Actions
Inactive
Split out 2D and 3D scenarios
G3zz
temporarily deployed
to
previews/1719/merge
October 30, 2026 15:20 — with
GitHub Actions
Inactive
G3zz
temporarily deployed
to
previews/1719/merge
October 30, 2026 15:32 — with
GitHub Actions
Inactive
G3zz
temporarily deployed
to
previews/1719/merge
October 30, 2026 16:41 — with
GitHub Actions
Inactive
G3zz
temporarily deployed
to
previews/1719/merge
October 30, 2026 17:45 — with
GitHub Actions
Inactive
G3zz
had a problem deploying
to
previews/1719/merge
November 2, 2026 14:21 — with
GitHub Actions
Failure
* Switch default view back to 3D * Update astro pi zoom button alt text * Fix syntax error in Simulator2d
G3zz
had a problem deploying
to
previews/1719/merge
November 5, 2026 12:28 — with
GitHub Actions
Failure
G3zz
had a problem deploying
to
previews/1719/merge
November 5, 2026 12:47 — with
GitHub Actions
Failure
G3zz
temporarily deployed
to
previews/1719/merge
November 5, 2026 16:42 — with
GitHub Actions
Inactive
G3zz
temporarily deployed
to
previews/1719/merge
November 5, 2026 16:47 — with
GitHub Actions
Inactive
G3zz
temporarily deployed
to
previews/1719/merge
November 5, 2026 17:10 — with
GitHub Actions
Inactive
G3zz
temporarily deployed
to
previews/1719/merge
November 5, 2026 17:20 — with
GitHub Actions
Inactive
G3zz
temporarily deployed
to
previews/1719/merge
November 5, 2026 17:27 — with
GitHub Actions
Inactive
G3zz
marked this pull request as ready for review
November 5, 2026 17:31
Contributor
ApprovabilityVerdict: Would Approve Macroscope's review found this PR approvable — Adds an optional 2D Sense HAT display while keeping 3D as the default. Effects are confined to the browser simulator, and the supplied orientation concern has a corresponding fix and regression coverage in the change. Needs human approval because:
Notes:
You can add or adjust custom eligibility rules. Learn more. |
Co-authored-by: macroscopeapp[bot] <170038800+macroscopeapp[bot]@users.noreply.github.com>
G3zz
temporarily deployed
to
previews/1719/merge
November 5, 2026 17:42 — with
GitHub Actions
Inactive
…ter rotated set_pixels. The 3D view leaves Sk.sense_hat.pixels in set_pixels order, so the 2D view needs the rotation index mapping to rebuild framebuffer order. It now gets that mapping… (#1732) ## Summary Fixes the LED matrix losing its orientation when you switch from the 3D view to the 2D view after a rotated `set_pixels` call. The 3D view (FlightCase) leaves `Sk.sense_hat.pixels` in `set_pixels` order, not framebuffer order. When the 2D view mounted, it read that buffer as if it were already in framebuffer order. Any image drawn with a non-zero rotation then showed up wrongly oriented in 2D. ## Changes - **FlightCase**: saves the index mapping from the last `setpixels` in a new field, `Sk.sense_hat.pixel_indexes`. - **Simulator2d**: - On its first snapshot, if `pixel_indexes` is set, it uses that mapping with `rotate` to put the pixels back into framebuffer order. It then writes the result back to `Sk.sense_hat.pixels` and clears `pixel_indexes`. - Its own `setpixels` handler also clears `pixel_indexes`, so an old mapping can't be applied to pixels the 2D view set itself. ## Tests - 3D→2D regression test: draws an asymmetric image with a rotation-90 `set_pixels`, then checks both the resulting buffer and the rendered LED colours in 2D. - FlightCase test: checks that `setpixels` saves the mapping in `Sk.sense_hat.pixel_indexes`. I haven't run these tests yet. Please run the suite before merging. <!-- Macroscope (Fix It For Me) template starts here --> > [!NOTE] > ### Macroscope: _Fix It For Me_ > - This PR originated from [this comment](https://github.com/RaspberryPiFoundation/editor-ui/pull/1719/files#r4484016063) in #1719. > - Since auto-merge is off, Macroscope will wait for checks to pass, investigate / repair any failures, and then leave this PR for you to merge when ready. > - You can also @mention Macroscope in this PR to request further changes. > > #### Activity > Currently: <!-- Macroscope (Fix It For Me) current status starts here -->Ready for review<!-- Macroscope (Fix It For Me) current status ends here --> > > <details> > <summary>Previously</summary> > > <!-- Macroscope (Fix It For Me) previous status starts here --> > - Waiting on checks > - Pushed fa47578 > - Action failed: CI-CD > - Waiting on checks > - Pushed 10ea54e > <!-- Macroscope (Fix It For Me) previous status ends here --> > > </details> ---- <!-- Macroscope (Fix It For Me) template ends here --> <!-- Macroscope's pull request summary starts here --> <!-- Macroscope will only edit the content between these invisible markers, and the markers themselves will not be visible in the GitHub rendered markdown. --> <!-- If you delete either of the start / end markers from your PR's description, Macroscope will append its summary at the bottom of the description. --> <!-- Macroscope's pull request summary ends here --> --------- Co-authored-by: macroscopeapp[bot] <170038800+macroscopeapp[bot]@users.noreply.github.com>
This branch was successfully deployed
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
This PR adds an alternative zoomed-in 2D view of the SenseHAT LED matrix to the AstroPiModel component. This feature was requested by the Youth Programmes team as we have observed through doing Mission Zero workshops that it is difficult to use the current 3D view of the Astro Pi on smaller or less powerful devices.
Users can now zoom in from the 3D view to a 2D view of the LED matrix, rendered using coloured divs: see the image below.
Notes
COPYRIGHTfile has been updated accordingly.src/utils/senseHatUtils.js