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

Add bgr and invert options #38

Merged
merged 2 commits into from
May 6, 2024
Merged

Add bgr and invert options #38

merged 2 commits into from
May 6, 2024

Conversation

RetiredWizard
Copy link
Contributor

Fixes adafruit/circuitpython#9151

This adds the logic from the st7795r library to add an option for switching the colorspace to BGR as well as inverting the display.

@RetiredWizard
Copy link
Contributor Author

RetiredWizard commented Apr 7, 2024

I just noticed #26, I think it would be a simple matter to add a third variable here perhaps called madctl which if passed would be used as the madctl bits and should allow anyone that knows what they're doing to set the rotation/BGR/scrolling values anyway they like. I'm thinking passing in a madctl value would cause the new bgr variable to be ignored.

If you think that's a good idea, I'll go ahead an update this with that change.

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 @RetiredWizard!

I pushed one commit to get the docs to be able to build. recent displayio API changes were causing that to fail, other driver libraries have it in the mock'd list any how. Once everything has shaken out and is matching in blinka displayio, I think perhaps we could use that during the docs build in order to not need for the mocked module.

This looks good to me. I tested it successfully with a Feather M4 + TFT Shield, I was able to use both bgr and invert arguments successfully.

With regards to the optional madctl functionality for more fine grained control. That sounds like a nice feature to me. I don't know if there are any other display driver libraries with that kind of argument, if so we should definitely adopt the same naming convention and API. Feel free to submit a new PR with that feature if it's something you're interested in working on.

@FoamyGuy FoamyGuy merged commit 3f6f08b into adafruit:main May 6, 2024
1 check passed
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request May 7, 2024
Updating https://github.com/adafruit/Adafruit_CircuitPython_ESP32SPI to 8.1.1 from 8.1.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_ESP32SPI#201 from adafruit/connect_dgram_mode

Updating https://github.com/adafruit/Adafruit_CircuitPython_ILI9341 to 1.5.0 from 1.4.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_ILI9341#38 from RetiredWizard/main

Updating https://github.com/adafruit/Adafruit_CircuitPython_LIS3MDL to 1.2.0 from 1.1.27:
  > Merge pull request adafruit/Adafruit_CircuitPython_LIS3MDL#26 from ContosChaos/patch-1

Updating https://github.com/adafruit/Adafruit_CircuitPython_AVRprog to 1.5.1 from 1.5.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_AVRprog#34 from RossK1/main

Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA:
  > Updated download stats for the libraries
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.

sunton_esp32_2432S028 ( usb type -c version on CircuitPython 9.1.0-beta.0)
2 participants