Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use settings.toml for sunton 2432S028 display rotation #9627

Merged
merged 3 commits into from
Sep 17, 2024

Conversation

RetiredWizard
Copy link

@RetiredWizard RetiredWizard commented Sep 14, 2024

This is a possible solution to the screen variant problem that showed up after PR #9340 from @occasional-contributor was merged. There was some discussion regarding the issue in #9340 after it was closed.

This change will use a new settings.toml parameter (CIRCUITPY_DISP_ROTATION) to set the screen rotation. I kept it simple and did not perform any value validation, however if the parameter doesn't exist I defaulted back to the 0 degree rotation that was originally used. I think that makes sense as it is consistent with the default behavior of the adafruit_ili9341 library and both the boards that @SeanTheITGuy and I received worked properly with a 0 degree rotation.

As a note, it does take a power cycle for a change in the parameter to take effect, a ctrl-D or soft reset isn't enough.

Thanks to occasional-contributor for coming up with the idea and @deshipu for pointing me at this possible solution 😁

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd write out DISPLAY so it's more readable. Other than that, I think this is a great solution. Thanks!

ports/espressif/boards/sunton_esp32_2432S028/board.c Outdated Show resolved Hide resolved
Co-authored-by: Scott Shawcroft <scott@tannewt.org>
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@tannewt tannewt merged commit 14ef837 into adafruit:main Sep 17, 2024
15 checks passed
@RetiredWizard RetiredWizard deleted the cydrotate branch September 17, 2024 23:48
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.

2 participants