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

Backlight reverts to full brightness #275

Closed
kittenarmy opened this issue Dec 15, 2023 · 11 comments · Fixed by #277
Closed

Backlight reverts to full brightness #275

kittenarmy opened this issue Dec 15, 2023 · 11 comments · Fixed by #277
Assignees

Comments

@kittenarmy
Copy link

v0.20.1

Steps to reproduce:
Set BLMax to 5 (BLMin stay set 0), press M to confirm - backlight reverts to full brightness until press exit.
Press M and backlight is full brightness again.

Also triggered by:
Press M to open menu, scroll with up/down to BackLt - backlight reverts to full brightness until press exit.

@JuantAldea
Copy link
Collaborator

JuantAldea commented Dec 15, 2023

Brightness is set to FULL when traversing backlight menu options. I think it actually goes back to MAX after any two keypresses, at least that's one of the cases.

@JuantAldea JuantAldea self-assigned this Dec 15, 2023
@JuantAldea JuantAldea added the bug Something isn't working label Dec 15, 2023
@egzumer
Copy link
Owner

egzumer commented Dec 15, 2023

This is inherited from 1o11 and I kept it. The idea is I guess to allow bringing back the backligth settings in a dark when it was set to off.

@egzumer egzumer removed the bug Something isn't working label Dec 15, 2023
JuantAldea added a commit to JuantAldea/uv-k5-firmware-custom that referenced this issue Dec 15, 2023
…xiting backlight menu entries

Backlight is set to FULL when interacting with backlight menu entries,
but it is not set back to MAX when exiting from those entries. This
commit corrects that behaviour.
JuantAldea added a commit to JuantAldea/uv-k5-firmware-custom that referenced this issue Dec 15, 2023
…xiting backlight menu entries

Backlight is set to FULL when interacting with backlight menu entries,
but it is not set back to MAX when exiting from those entries. This
commit corrects that behaviour.
@JuantAldea
Copy link
Collaborator

I have proposed solution of the "side effects" of this, although it is really cosmetic and it increases the binary size so I have mixed feelings about it.

JuantAldea added a commit to JuantAldea/uv-k5-firmware-custom that referenced this issue Dec 15, 2023
…xiting backlight menu entries

Backlight is set to FULL when interacting with backlight menu entries,
but it is not set back to MAX when exiting from those entries. This
commit corrects that behaviour.
@gartnl
Copy link

gartnl commented Dec 15, 2023

I actually like the backlight at FULL when entering or traversing the menu, it's kind of a failsafe. Just imagine you are by accident setting MAX to 1 ( might happen if you think you are setting MIN ). Press exit twice or simply wait for the timeout of the backlight.
Setting it to MAX when leaving the menu is fine, but keep it on FULL as long as you are in MENU.

@JuantAldea
Copy link
Collaborator

JuantAldea commented Dec 15, 2023

Yes, the failsafe is out of discussion. But it is also true that it is not returned to the configured max BL exactly when it should.

If you go above the Blit options, you will see that the BLit does not return to the configured until you are "two options away" from them or, actually, two key-presses away.

@egzumer
Copy link
Owner

egzumer commented Dec 15, 2023

The button pressing functions are a mess, I know it is not perfect. I didn't want to spend more time fighting that, this was the best I could get it to be then.
I'll take a look at the solution later.

egzumer pushed a commit that referenced this issue Dec 15, 2023
…backlight menu entries

Backlight is set to FULL when interacting with backlight menu entries,
but it is not set back to MAX when exiting from those entries. This
commit corrects that behaviour.
@egzumer
Copy link
Owner

egzumer commented Dec 15, 2023

It is cosmetic and takes some memory space, but the operation is nicer, I like it. I tried to make it work like that before.

@kittenarmy
Copy link
Author

I actually like the backlight at FULL when entering or traversing the menu, it's kind of a failsafe. Just imagine you are by accident setting MAX to 1 ( might happen if you think you are setting MIN ). Press exit twice or simply wait for the timeout of the backlight. Setting it to MAX when leaving the menu is fine, but keep it on FULL as long as you are in MENU.

If you have dark adapted eyes, using the radio with this behaviour is actually painful and not at all intuitive. It somewhat defeats the point of having option to lower the brightness. I prefer set and forget and expect the same. I suggest it be a build option like the guarding of TX on all frequencies.

@kittenarmy
Copy link
Author

kittenarmy commented Dec 15, 2023

This is inherited from 1o11 and I kept it. The idea is I guess to allow bringing back the backligth settings in a dark when it was set to off.

Do you know where in the repo it is reverting? I tried searching for BACKLIGHT_SetBrightness but cannot find where it is. Did it get refactored yet? I'd create a pull to add some flag to makefile and read in menu e.g. #ifdef ENABLE_MENU_MAX_BACKLIGHT = 0 .

@egzumer
Copy link
Owner

egzumer commented Dec 15, 2023

I'm raising the stakes: 1151cf8

Interestingly, there is more code but it takes 52B less space :)

egzumer added a commit that referenced this issue Dec 15, 2023
@kittenarmy
Copy link
Author

I'm raising the stakes: 1151cf8

Interestingly, there is more code but it takes 52B less space :)

This is great. Thank you!

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 a pull request may close this issue.

4 participants