This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#2920 - H300 : First press on NAVI turns on backlight if it's off
Attached to Project:
Rockbox
Opened by Nicolas Pennequin (nicolas_p) - Sunday, 15 January 2006, 23:32 GMT+2
Last edited by Nicolas Pennequin (nicolas_p) - Thursday, 16 February 2006, 00:13 GMT+2
Opened by Nicolas Pennequin (nicolas_p) - Sunday, 15 January 2006, 23:32 GMT+2
Last edited by Nicolas Pennequin (nicolas_p) - Thursday, 16 February 2006, 00:13 GMT+2
|
DetailsH300 : First press on NAVI turns on backlight if it's off
Simple patch to create a behaviour similar to the original iRiver firmware : when the backlight is off, a press on NAVI will only turn the LCD on. NAVI is currently the only button with this behaviour. Maybe i'll try to make it work exactly like the iRiver firmware but i'm pleased with it as it is. (use the -p1 switch to patch) |
could you possibly add a Config menu for this?
most users on MisticRiver said it would be better if this
is user selected...
You need to return a value from button_read(). You should use
return 0;
instead of just
return;
Also, don't use TAB for indenting.
Linus, thanks for your comment. I've changed the tabs to
spaces and i replaced "return;" by "return -1;" ("return 0;"
didn't work as expected)
I also fixed a bug i found that blocked all NAVI presses
when the charger was plugged and the backlight when plugged
was set to on.
The previous patch was a bit messy and included a leftover
of the brightness patch... That's fixed too (sorry).
Next step is to add an option for this, but i still have to
figure out how...
There also is something i forgot in the summary : thanks to
linuxstb and Matze for helping me with this :-)
it seems adding a setting for this is a bit difficult, as my
patch deals with firmware and settings are on apps side.
I think i'll need dome help as i still have lots of things
to discover about rockbox :)
I also added a setting (general setting > display > LCD settings), which allows to choose between 3 different behaviours :
- "None" : default rockbox behaviour, no keypresses are filtered
- "Only NAVI" : NAVI is the only button which will turn the backlight on, exactly like in the old version of the patch
- "All buttons" : This reproduces the iriver firmware behaviour, where all buttons are filtered if backlight is off
Now it's easy to add other buttons than NAVI, but IMHO NAVI is the best one for this.
Any chance this could be made to work with the H140? Any chance it could also work from the remote (e.g., when the Play/Pause button was pressed)?
This is how most mobile phones work and is indeed valuable for devices with screens which are unreadable (or nearly) without backlight.
Configuring "this only happens for a specific key" is overkill IMHO and only adds code bloat and user confusion.
> only adds code bloat and user confusion.
It's actually quite useful, Imagine you have your player in your pocket and you FF/REV/skip or whatever by pressing these keys 'blind'. There is no need for the backlight, yet at each keypress it turns on using up energy..
The setting now has only two possible values : "none" or "all buttons". I decided to keep it open to adding other possibilities, that's why the value isn't just stored as a boolean.
Also the setting defaults to "all buttons" on color LCD targets, and "none" on others.
Also, we need to come up with a better name for the option, and better function/variable names. As it is now, it reads as if it controls whether backlight is turned on by buttons (at all) or not.
Also i tryed to find better names for the variables/functions.
What do you think ?
it will have a separate setting...
I like to have the feature for my main unit,
but I don't see any sense for it for my (NON-LCD)
remote ;)
Can't the backlight for the remote be controlled separately from the main unit? It would make sense to me to only turn on the remote's backlight when a remote button is pressed, so this wouldn't get in anyone's way for non-LCD remotes.