Skip to content

Remove support for auto-brightness #6734

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 3 commits into from
Aug 10, 2022

Conversation

dhalbert
Copy link
Collaborator

@dhalbert dhalbert commented Aug 10, 2022

Fixes #5476 by removing auto_brightness and related support completely.

@deshipu @tannewt My understanding of the comments in #5476, particularly the later ones, is that auto-brightness never worked, and we may as well just remove it, which is what I proposed in that issue. If this is not correct, then I'll close or change this.

This PR explicitly removes the .auto_brightness attribute on Display and FrameBufferDisplay. It does not just render it inoperable in 8.0.0, to be removed in 9.0.0. I could do such a staged removal if you think it advisable.

I found about five boilerplate references to .auto_brightness in the Learn Guide repo, and about three in the libraries, all of which could easily be handled.

@deshipu There are also a couple of mentions of .auto_brightness in circuitpython-stage. Before this PR is merged, those would need to be removed and I would update the frozen submodule.

@dhalbert dhalbert added this to the 8.0.0 milestone Aug 10, 2022
@dhalbert dhalbert requested a review from tannewt August 10, 2022 17:07
@dhalbert dhalbert marked this pull request as ready for review August 10, 2022 17:07
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.

This looks good to me! I think it is good to remove since it just always set to full brightness. I think I wanted it because I had dreams of adjusting brightness when the vm wasn't running.

@dhalbert
Copy link
Collaborator Author

circuitpython-stage updated by #6740 to complete this transition for frozen modules

@alison-gravley
Copy link

Just so I understand, I was using "board.DISPLAY.brightness" to adjust the brightness on my ESP32-S3 TFT and after the autobrightness removal, I can't adjust it at all now. Was this intended? I understand the autobrightness doesn't work, but I was not expecting the "manual" brightness setting to be removed entirely as well.

@dhalbert
Copy link
Collaborator Author

Just so I understand, I was using "board.DISPLAY.brightness" to adjust the brightness on my ESP32-S3 TFT and after the autobrightness removal, I can't adjust it at all now. Was this intended? I understand the autobrightness doesn't work, but I was not expecting the "manual" brightness setting to be removed entirely as well.

That was not the intention. I tested it with a PyPortal, but not an ESP32-S3 TFT. Could you open an issue with a small test program? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PWM auto-brightness for displays does not work
3 participants