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

fix(color): Scale SF backlight value to user selected min/max backlight values #4060

Merged
merged 3 commits into from
Oct 16, 2023

Conversation

philmoz
Copy link
Collaborator

@philmoz philmoz commented Sep 18, 2023

Fixes #4057

Restrict the backlight value selected via the special function to lie between the user selected values for 'ON brightness' and 'OFF brightness' values.

When using a pot/slider to control the backlight the min value on the slider will be set to the 'OFF brightness' value, the max value will be 'ON brightness'. Values in between are scaled accordingly.

Tested on TX16S and EL18.

Note: If 'OFF brightness' is set to the lowest value in the settings UI then the inactivity timer will turn the LCD off. This is not true of the pot/sider value - the lowest value does not turn the LCD off.

@philmoz
Copy link
Collaborator Author

philmoz commented Sep 18, 2023

Updated the radio setup UI for backlight so that the ON slider can't go below the OFF value and the OFF slider can't go above the ON value.

@pfeerick pfeerick added the color Related generally to color LCD radios label Sep 29, 2023
@philmoz philmoz changed the title fix(color); Scale special function backlight value to user selected min/max backlight values. fix(color): Scale special function backlight value to user selected min/max backlight values. Oct 2, 2023
@pfeerick pfeerick self-requested a review October 13, 2023 10:46
@pfeerick pfeerick added this to the 2.10 milestone Oct 13, 2023
@pfeerick pfeerick changed the title fix(color): Scale special function backlight value to user selected min/max backlight values. fix(color): Scale SF backlight value to user selected min/max backlight values Oct 13, 2023
@pfeerick
Copy link
Member

Damnit... this collided with #4125 🤣

@philmoz
Copy link
Collaborator Author

philmoz commented Oct 16, 2023

Give me a little while to rebase things that might be affected by the recent merges.

@philmoz philmoz force-pushed the slider-backlight-scale branch from 02de70a to 9866ba4 Compare October 16, 2023 06:59
Copy link
Member

@pfeerick pfeerick left a comment

Choose a reason for hiding this comment

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

Thanks, that seems to be working ok on TX16S, and is keeping the brightness SF within the bounds of the ON and OFF brightness sliders. Backlight can no longer jump to a higher brightness level when the inactivity timer kicks in.

@pfeerick pfeerick merged commit c4a2c46 into EdgeTX:main Oct 16, 2023
37 checks passed
@Neutral67fr
Copy link

Neutral67fr commented Dec 2, 2023

Sorry I have to step in this discussion because I just jumped from 2.8.4 to 2.9.2 and can state that there actually is a flaw with backlight settings...
I have backlight set on S2 with GF. I can state that the radio seems to apply the "ON brightness" setting value 2 seconds after no user input (not "inactivity timeout" related), then will apply the "OFF brightness" setting value after the timeout.
Consequence is: When backlight GF setting is above ON brightness setting, the baclight increases after 2 s, and then the contrary (reduces if ON brightness setting is belows S2 setting).
So I get a neverending changing backlight level when using screen/buttons/sticks if both GF and ON brightness values are not equal...

Video here: https://drive.google.com/file/d/1dN6nbhgr7uitGb2rNAhHY7WyRpRaQqh8/view?usp=sharing

@philmoz
Copy link
Collaborator Author

philmoz commented Dec 2, 2023

The changes in this PR are not included in 2.9.x.
They will be in 2.10.

@philmoz philmoz deleted the slider-backlight-scale branch January 24, 2024 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
color Related generally to color LCD radios
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Screen Timeout brighter then Manual Screen Brightness
3 participants