Skip to content

Update st7789_280x240_simpletest.py #43

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

Merged
merged 8 commits into from
Jun 4, 2025
Merged

Conversation

CrackXT
Copy link
Contributor

@CrackXT CrackXT commented May 26, 2025

Hello makermelissa,

This is PR for an extended test code of st7789_280x240_simpletest.py.

Now the backlight setting and an automatic offset correction of the ST7789 display driver at a resolution of 280x240 (1.69", Product ID: 5206) is included.

#Issue
Add an extended version of st7789_280x240_simpletest.py #42
#Pull Request
Enhanced compatibility #40

Thank you for your work and that of the community!

With kind regards
CrackXT

#Issue 
Add an extended version of st7789_280x240_simpletest.py adafruit#42
#Pull Request  
Enhanced compatibility adafruit#40
@makermelissa
Copy link
Collaborator

Please run pre-commit. See https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/check-your-code for more info.

CrackXT added 3 commits May 27, 2025 14:18
@CrackXT
Copy link
Contributor Author

CrackXT commented May 27, 2025

Hi makermelissa

I have run pre-commit as well as black and ruff. After the code corrections, I pass all the tests on the PC with Passed. Unfortunately, I don't know why the error E999 code 2 appears on github.
Screenshot 2025-05-27 162707

Thank you for your work and that of the community!

With kind regards
CrackXT

Copy link
Contributor

@FoamyGuy FoamyGuy left a comment

Choose a reason for hiding this comment

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

Please do not change the values inside of .pre-commit-config.yaml

We like to keep that file in sync across all of the libraries. So when it gets updated it will get updated in all of them at once and they will always stay using the same versions.

Changing the versions inside of there is what caused the actions check to fail. Our ruff configuration contains some values that seem to have been deprecated / removed in the newer versions that you changed to.

CrackXT added 2 commits May 28, 2025 09:31
reset to the origin
ruff fix by Adafruit .pre-commit-config.yaml
# first value default setting for 1.69" with 0° and 180° rotation
# second value default setting for 1.69" with 90° and 270° rotation
width = 240 if rotation in (0, 180) else 280
height = 280 if rotation in (0, 180) else 240
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the remaining ruff check issue is it wanting these tuples used in the if statements to be literal sets instead.
i.e.

height = 280 if rotation in {0, 180} else 240

Essentially just swap to curly braces instead of parens around them.

CrackXT added 2 commits May 29, 2025 09:37
looks strange, but we will test...
@CrackXT
Copy link
Contributor Author

CrackXT commented May 29, 2025

Hello FoamyGuy,

thank you for your support and help. It finally seems to be done. I hope...

Thank you for your work and that of the community!

With kind regards
CrackXT

Copy link
Contributor

@FoamyGuy FoamyGuy 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! this looks good to me.

@FoamyGuy FoamyGuy merged commit 5661a1c into adafruit:main Jun 4, 2025
1 check passed
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Jun 5, 2025
Updating https://github.com/adafruit/Adafruit_CircuitPython_FT5336 to 1.1.5 from 1.1.4:
  > Merge pull request adafruit/Adafruit_CircuitPython_FT5336#9 from FoamyGuy/update_rtd_yml

Updating https://github.com/adafruit/Adafruit_CircuitPython_INA228 to 1.1.0 from 1.0.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_INA228#3 from adafruit/refactor

Updating https://github.com/adafruit/Adafruit_CircuitPython_ST7789 to 2.1.1 from 2.1.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_ST7789#43 from CrackXT/main

Updating https://github.com/adafruit/Adafruit_CircuitPython_Dash_Dis to 3.0.3 from 3.0.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_Dash_Dis#23 from FoamyGuy/displayio_api_updates
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.

3 participants