Skip to content

Add a 180° display rotation setting (right-handed use) - #1071

Open
seedsigner-right wants to merge 2 commits into
SeedSigner:devfrom
seedsigner-right:display-rotation
Open

seedsigner-right wants to merge 2 commits into
SeedSigner:devfrom
seedsigner-right:display-rotation

Conversation

@seedsigner-right

@seedsigner-right seedsigner-right commented Nov 5, 2026 •

Copy link
Copy Markdown

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) or 180°. Nothing changes unless it is turned on.

  • Screen: Renderer turns the image 180° just before it reaches the display driver (show_image, including show_direct, and show_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.
  • Controls: to the user the picture looks normal, but every control has moved round with the board. HardwareButtons therefore 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.
  • Camera: adds the display rotation to its own rotation, so Camera rotation keeps meaning "how the camera is mounted" and doesn't need changing when the device is flipped.
  • A tiny helpers/orientation.py reads 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

  • Only 0° and 180°: the original display is square and 90°/270° would put the joystick at the top or bottom.
  • The setting is read when each frame is drawn and each key is read, so it applies immediately, without re-initialising the display.
  • A contributor offered in Add a 180° display option for alternate hand positioning #1049 on 30 Oct to work on this. If they already have work in progress, I'm happy to close this in their favour.
  • Update: the first version of this PR left KEY1–3 alone. Hands-on testing showed the top and bottom side buttons then act in reverse (they work, but feel wrong), so the second commit swaps KEY1↔KEY3 too, and a test covers it. Retested on the device.
  • Disclosure: this change was written by an AI assistant (Claude) at the request of the owner of this account, who tested it on a real device. Review it with that in mind.

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):

Display rotation screens


This pull request is categorized as a:

  • New feature
  • Bug fix
  • Code refactor
  • Documentation
  • Other

Checklist

I ran pytest locally

  • All tests passed before submitting the PR (338 passed, also after the KEY1/KEY3 commit)
  • I couldn't run the tests
  • N/A

I included screenshots of any new or modified screens

  • Yes
  • No
  • N/A

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 real renderer.py, buttons.py and camera.py from source with a stand-in RPi.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.

  • Yes
  • No, I’m a fool
  • N/A

I tested this PR hands-on on the following platform(s):

  • Raspberry Pi OS Manual Build
  • SeedSigner OS on a Pi0/Pi0W board: a Pi Zero 2 W with the original Waveshare 1.3" hat, running SeedSigner OS 0.8.7 with the same change applied on top of 0.8.7 (the only difference from this branch is the default, 180° there, and the .pot entry). Used hands-on by the owner of this account.
  • Emulator

I have reviewed these notes:

  • Keep your changes limited in scope.
  • If you uncover other issues or improvements along the way, ideally submit those as a separate PR.
  • The more complicated the PR, the harder it is to review, test, and merge.
  • We appreciate your efforts, but we're a small team of volunteers so PR review can be a very slow process.
  • Please only "@" mention a contributor if their input is truly needed to enable further progress.
  • I understand

seedsigner-right and others added 2 commits November 5, 2026 06:05
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a 180° display option for alternate hand positioning

1 participant