Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Rockbox Ports are now being developed for various digital audio players!

+  Rockbox Technical Forums
|-+  Rockbox General
| |-+  Rockbox General Discussion
| | |-+  Remember Sleep-Timer on boot
« previous next »
  • Print
Pages: 1 [2]

Author Topic: Remember Sleep-Timer on boot  (Read 7037 times)

Offline AlexP

  • Global Moderator
  • Member
  • *
  • Posts: 3688
  • ex-BigBambi
Re: Remember Sleep-Timer on boot
« Reply #15 on: February 20, 2008, 03:58:49 AM »
I think it should remember the previous setting, but not enable it.  That way if you always use the same time, you just go to the menu and select it, without having to scroll through to the same time every time.
Logged
H140, F60, S120, e260, c240, Clip, Fuze v2, Connect, MP170, Meizu M3, Nano 1G, Android

Offline DanRock

  • Member
  • *
  • Posts: 12
Re: Remember Sleep-Timer on boot
« Reply #16 on: February 20, 2008, 09:06:13 AM »
Simply from a user perspective (I'm new to the RockBox code), I would want a sub-menu for the sleep-timer.  One menu item would control the on-boot default sleep value; the other menu item would control the current session's sleep-timer.  The session sleep-timer is reset to the boot value upon boot.

This would enable a default boot value and allow the user to change the sleep-timer for the current session.  While also allowing the user to set the values via the menu.
Logged

Offline AlexP

  • Global Moderator
  • Member
  • *
  • Posts: 3688
  • ex-BigBambi
Re: Remember Sleep-Timer on boot
« Reply #17 on: February 20, 2008, 11:28:51 AM »
Quote from: DanRock on February 20, 2008, 09:06:13 AM
Simply from a user perspective (I'm new to the RockBox code), I would want a sub-menu for the sleep-timer.  One menu item would control the on-boot default sleep value; the other menu item would control the current session's sleep-timer.  The session sleep-timer is reset to the boot value upon boot.

This would enable a default boot value and allow the user to change the sleep-timer for the current session.  While also allowing the user to set the values via the menu.

That sounds like complete option overkill and the kind of thing we want to avoid if possible.  Rockbox already has a huge number of options, and that would be an unnecessary addition (in my opinion of course).  Whilst I have no say on the matter, I would think that is very unlikely to happen.
Logged
H140, F60, S120, e260, c240, Clip, Fuze v2, Connect, MP170, Meizu M3, Nano 1G, Android

Offline DanRock

  • Member
  • *
  • Posts: 12
Re: Remember Sleep-Timer on boot
« Reply #18 on: February 20, 2008, 11:35:56 AM »
It probably is overkill.  

So, I think I can do that code at this point.  But an example would greatly help me out to see how it is done.  What is the name of setting which is read, not saved and has no menu item?

Logged

Offline JdGordon

  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
Re: Remember Sleep-Timer on boot
« Reply #19 on: February 20, 2008, 01:47:50 PM »
Its not currently possible to read a setting from a config file and not write it back out. It could be added but its a bit of a hassle.
Logged


Using PMs to annoy devs about bugs/patches is not a good way to have the issue looked at.

Offline DanRock

  • Member
  • *
  • Posts: 12
Re: Remember Sleep-Timer on boot
« Reply #20 on: February 20, 2008, 02:22:45 PM »
Ok thanks.  Is there an example someplace of what's required top add a new setting?
Logged

Offline JdGordon

  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
Re: Remember Sleep-Timer on boot
« Reply #21 on: February 20, 2008, 02:35:17 PM »
add it to global_settings in setting.h
if you want to be able to save/load it from a .cfg add it to settings_list.c
if you want it in the menus look in apps/menus/*.c
Logged


Using PMs to annoy devs about bugs/patches is not a good way to have the issue looked at.

Offline questrdl

  • Member
  • *
  • Posts: 2
Re: Remember Sleep-Timer on boot
« Reply #22 on: March 03, 2008, 08:58:12 AM »
Insert Quote
One easy solution: Set the config loading to *load* a sleep timer value, but prevent the "manage config" from saving a sleep timer value. That way the current behaviour of "don't save sleep timer settings on manual poweroff" is kept, but you can add a sleep timer line to your fixed.cfg if you want it to load at boot every time.

As I understand it, if the sleep timer was in the brought out as one of the "Custom CFG File" table items, the user could set a persistent timer to turn the device off.  Where is the best place to ask to have this implemented?

I would use this to save battery life.  Many times I accidentally leave my  player running for hours and the next time I go to use it the battery is discharged. This would be a HUGE improvement for me.
Logged

(:@)

  • Guest
Re: Remember Sleep-Timer on boot
« Reply #23 on: March 03, 2008, 10:25:02 AM »
Quote from: questrdl on March 03, 2008, 08:58:12 AM
Where is the best place to ask to have this implemented?
Tracker (see "feature requests" on the left side)

Quote from: questrdl on March 03, 2008, 08:58:12 AM
I would use this to save battery life.  Many times I accidentally leave my  player running for hours and the next time I go to use it the battery is discharged. This would be a HUGE improvement for me.
You can apply the attached patch and add the following entry in your config file:
auto shutdown: [countdown time in minutes]
e.g.
auto shutdown: 30
(will automatically shutdown your player in 30 minutes)
* auto_shutdown_patch.txt (1.3 kB - downloaded 207 times.)
« Last Edit: March 03, 2008, 10:45:03 AM by (:@) »
Logged

Offline questrdl

  • Member
  • *
  • Posts: 2
Re: Remember Sleep-Timer on boot
« Reply #24 on: March 04, 2008, 12:45:54 PM »
 Is there a build out there that includes this  "auto_shutdown_patch.txt " ??
Logged

Offline AlexP

  • Global Moderator
  • Member
  • *
  • Posts: 3688
  • ex-BigBambi
Re: Remember Sleep-Timer on boot
« Reply #25 on: March 04, 2008, 12:57:54 PM »
I very much doubt it as it has only been downloaded twice.  I suspect he cooked it up specifically for you.
Logged
H140, F60, S120, e260, c240, Clip, Fuze v2, Connect, MP170, Meizu M3, Nano 1G, Android

Offline Riffer

  • Member
  • *
  • Posts: 14
Re: Remember Sleep-Timer on boot
« Reply #26 on: February 20, 2010, 11:44:27 AM »
I have built a patch for sleep timer that fits all my needs.

Have a look at FS#11042
Logged

  • Print
Pages: 1 [2]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox General
| |-+  Rockbox General Discussion
| | |-+  Remember Sleep-Timer on boot
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.093 seconds with 14 queries.