Rockbox Technical Forums

Rockbox Development => Feature Ideas => Topic started by: seani on October 31, 2009, 05:13:24 PM

Title: Replace "sleep timer" with "pause timer"
Post by: seani on October 31, 2009, 05:13:24 PM
Hi,

I mostly use RockBox to listen to Podcasts as I drift off to sleep - escapepod.org features high on my list.

Trouble is I usually fall asleep part way through. To avoid running the battery down I set a sleep timer, but of course that's reset every boot.

Rather than a sleep timer, I thought I'd fiddle with changing it to a "pause timer". That way i set the time to 10 mins and when it stops, I press "play" to get another 10 minute bite of the cherry. Repeat till finished.

If I fall asleep, it pauses and then turns off. This seemed a bit more flexible than a straightforward power off timer - you don't keep having to specify another 10 mins manually for instance - but I wondered if this was a use case very specific to me or if it had general appeal?
Title: Re: Replace "sleep timer" with "pause timer"
Post by: AlexP on October 31, 2009, 05:28:04 PM
I don't think changing sleep to pause is a good idea, but adding a pause timer might have merit
Title: Re: Replace "sleep timer" with "pause timer"
Post by: seani on October 31, 2009, 05:52:13 PM
I don't think changing sleep to pause is a good idea, but adding a pause timer might have merit

But wouldn't it be equivalent?

When the pause timer matures, it pauses, and then, if there's no intervention, the idle timeout kicks in turning it off?

So if you (or very possibly just me) fall asleep, it turns itself off but if you (me!) is still awake pressing play kicks the cycle off again?

Eta: thanks for shifting to the right place.
Title: Re: Replace "sleep timer" with "pause timer"
Post by: AlexP on October 31, 2009, 06:47:42 PM
I guess so.  Other people have floated around having a sleep timer that gives you a warning and you could then cancel it, and this would do the job nicely for that.
Title: Re: Replace "sleep timer" with "pause timer"
Post by: seani on October 31, 2009, 07:08:39 PM
I guess so.  Other people have floated around having a sleep timer that gives you a warning and you could then cancel it, and this would do the job nicely for that.

I've downloaded the development VM and I'll see if I can mess with it to do what I want - only way to see if it's any use is to try.

Perhaps there are a few other people using it to fall asleep to. I find it's great for my frequent insomnia, but I get tangled up in the headphones and wake up looking like I've been flayed alive. Can I have a patch to fix that please?
Title: Re: Replace "sleep timer" with "pause timer"
Post by: bakseetdrivr on October 31, 2009, 08:09:51 PM
seani,
i had that problem too as i find music is great to slow the heart rate/make you fall asleep faster.
check out my solution (http://anythingbutipod.com/forum/showthread.php?t=48010 )

and to add to the pause timer, that would be great for anything where you are constantly taking headphones in/out. at work i would put sleep on so my sansa didnt run all day, but having a pause timer would allow me not to have to worry about that and turn it back on each time a customer came to talk to me.

-Tom
Title: Re: Replace "sleep timer" with "pause timer"
Post by: seani on October 31, 2009, 08:45:06 PM
Hi Tom,

Nice bit of lateral thinking !

S

ETA:

Tom, the thought occurs that there's a RockBox setting that automatically pauses when you unplug your headphones and resumes when you plug them back in. Would that simplify matters?


Also have managed to build the firmware for my C240 incorporating the pause-timeout change.

Essentially:

* the sleep-timeout now pauses when it matures.
* if the player is left paused, the idle-timeout kicks in and it turns off
* if it's unpaused, the sleep-timer kicks off again for the same period
* when the player powers off the sleep-timeout is turned off

It seems to work fine on my player, but although there aren't many changes - a handful of lines - I'm aware I don't know much, so more reading and testing I think.

A test "in the field" tonight :-)
Title: Re: Replace "sleep timer" with "pause timer"
Post by: Riffer on February 20, 2010, 11:47:58 AM
Maybe the version I now have done for me now fits your needs to.

Have a look at FS#11042
Title: Re: Replace "sleep timer" with "pause timer"
Post by: seani on February 20, 2010, 05:16:20 PM
Maybe the version I now have done for me now fits your needs to.

Have a look at FS#11042

Hi Riffer (and Nick),

Thanks for pointing this out. I've been running my own less well implemented patch and your collective additions would make it perfect for me. I'll have a go at applying your patch to the new source, thanks for sharing it!

Sean