FS#5001 - sleep timer 5 min. increment problem

Attached to Project: Rockbox
Opened by Anonymous Submitter - Sunday, 02 April 2006, 17:32 GMT
Task Type Bugs
Category Settings
Status Closed
Assigned To No-one
Operating System All players
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


There is a problem with the new 5 min minimum increments on the sleep timer. You cannot turn the sleep timer off if it has changed to a non-5 minute increment while it is counting down.
For example, if you set the timer to 15 minutes. Wait one minute, until it says 14 minutes, and then try to turn it off, you cannot. It can be brought down to 4 minutes, but not to zero, because 4 minutes is less than the minimum five minute increment.

This means that you have to wait until the sleep timer has counted down to a multiple of 5 again before you can disable it, which is a little silly.

Recommended fix:
a) at below 5 minutes, the sleep timer should revert to 1 minute increments, or
b) at below 5 minutes lowering the sleep timer should bring it back down to 0.

Apologies for the double post.
This task depends upon

Closed by  Brandon Low (lostlogic)
Wednesday, 05 April 2006, 22:37 GMT
Reason for closing:  Accepted
Additional comments about closing:  In CVS, thanks.
Comment by Rani Hod (RaeNye) - Wednesday, 05 April 2006, 21:53 GMT
patch vs. current CVS attached (patch -p0)

Method (b) was implemented, since method (a) would involved option select/gui select redesign.

- please mark bug #5000 as a duplicate of this one.
- maybe changing option_select_next() in a similar fashion is logical. Apart from symmetry, I find no reason to do so.

Best regards,
Comment by Rani Hod (RaeNye) - Wednesday, 05 April 2006, 22:00 GMT
Here's another patch for a related sleep timer bug.
Previously, the timer value was rounded down, so the value is decrease by one minute every time you enter and leave the "set timer" menu (as at least one second has elapsed...).

I fixed that to rounding the value up.