Repository navigation
Add a 180° display rotation setting (right-handed use) - #1071
Open
seedsigner-right wants to merge 2 commits into
Open
seedsigner-right wants to merge 2 commits into
seedsigner-right wants to merge 2 commits into
Conversation
Settings → Advanced → Hardware → Display rotation: 0° (default) or 180°. With the device turned upside down the joystick sits under the right hand. At 180° the whole picture is turned just before it reaches the display (Renderer: show_image, show_image_pan), so every screen, QR code and the camera preview turn together. The joystick directions are swapped to match what is on screen (HardwareButtons reads UP↔DOWN, LEFT↔RIGHT). KEY1-3 need no change: their on-screen labels turn with the picture and stay next to the physical buttons. The camera adds the display rotation to its own, so "Camera rotation" keeps meaning how the camera is mounted. Off by default; nothing changes unless the setting is turned on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Found on the device: with the screen turned the picture looks normal to the user, but every control has moved round with the board. The side button now at the top is the one the board calls KEY3. KEY2 and the press stay. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Problem or Issue being addressed
Closes #1049. Turning the device upside down puts the joystick under the right hand, which many right-handed users prefer, but the screen is then upside down. Today only the camera can be rotated.
Solution
A new setting, Settings → Advanced → Hardware → Display rotation:
0°(default) or180°. Nothing changes unless it is turned on.Rendererturns the image 180° just before it reaches the display driver (show_image, includingshow_direct, andshow_image_pan). The canvas itself stays as it was, so every screen, QR code, toast and the camera preview turn together, and no screen code needed changing.HardwareButtonstherefore reads UP↔DOWN, LEFT↔RIGHT and KEY1↔KEY3 swapped when turned (wait_for,check_for_low), so the joystick's "up" is still up and the side button at the top acts as KEY1. KEY2 and the joystick press are unchanged. Callers still receive the logical key.helpers/orientation.pyreads the setting (also accepts the value as text, as SettingsQR / persistent settings may carry it).messages.pot: one new string, "Display rotation" (with a translator note). "0°" and "180°" already exist.Additional Information
Screenshots
The Hardware menu with the new entry, the setting, and what the display panel shows at 180° (upright once the device is held the other way round):
This pull request is categorized as a:
Checklist
I ran
pytestlocallyI included screenshots of any new or modified screens
I added or updated tests
tests/test_display_rotation.py(6 tests). The rest of the suite mocks the renderer and the buttons (tests/base.py), so these load the realrenderer.py,buttons.pyandcamera.pyfrom source with a stand-inRPi.GPIO: the picture turns, the joystick and KEY1/KEY3 swap, KEY2 and the press stay, the camera follows, and the setting is off by default.I tested this PR hands-on on the following platform(s):
.potentry). Used hands-on by the owner of this account.I have reviewed these notes: