Use settings.toml for sunton 2432S028 display rotation #9627
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.
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 😁