Commit graph

198 commits

Author SHA1 Message Date
Hristo Kovachev
495c63f867 New "battery benchmark" plugin by Alexander Spyridakis, modified a bit by me
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8451 a1c6a512-1295-4272-9138-f99709370657
2006-01-25 18:29:56 +00:00
Brandon Low
cdacab3d89 Charging state reporting on H3x0
Don't read the GPIO every refresh of statusbar or gwps for plugged state, use a
variable exported from powermgmt instead.
Allow Custom WPS to access %bc for battery charge state on targets that support
this.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8383 a1c6a512-1295-4272-9138-f99709370657
2006-01-19 07:47:34 +00:00
Brandon Low
ccc72cc2d0 Part of patch #1407541 to improve battery smoothing by absorbing extra precision from the battery scale factor
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8372 a1c6a512-1295-4272-9138-f99709370657
2006-01-18 16:48:54 +00:00
Marcoen Hirschberg
b0fee17d6e waiting is over: initial unicode commit
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8169 a1c6a512-1295-4272-9138-f99709370657
2005-12-06 13:27:15 +00:00
Jens Arnold
a6d409d9db Replaced the booolean 'Backlight On When Plugged' setting with a complete alternative 'Backlight When Plugged' timeout setting. * Yield during poweroff to make backlight_off() work. * Bumped config version, save your settings.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8053 a1c6a512-1295-4272-9138-f99709370657
2005-11-23 20:12:33 +00:00
Jens Arnold
b51f7dfc9b Backlight handling: * Added 'Caption Backlight' and 'Backlight On When Charging' for the iriver remote LCD. * Enabled the backlight code for the simulator, and prepared backlight simulation. It's only a stub atm, writing messages to the console window. * Added tick task handling to the simulators for this to work. * Code cleanup in backlight.c, less dead code.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8034 a1c6a512-1295-4272-9138-f99709370657
2005-11-21 23:55:39 +00:00
Anton Oleynikov
c94557e0b9 refactored radio status code
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7999 a1c6a512-1295-4272-9138-f99709370657
2005-11-19 19:23:44 +00:00
Linus Nielsen Feltzing
d5f3e9ba83 H100: turn off remote backlight before cutting the power
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7975 a1c6a512-1295-4272-9138-f99709370657
2005-11-19 01:30:42 +00:00
Linus Nielsen Feltzing
e16ebf1a50 Moved the power_init() call to main(), removed unfinished inits for the H300
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7964 a1c6a512-1295-4272-9138-f99709370657
2005-11-18 14:55:51 +00:00
Linus Nielsen Feltzing
91216a5edc The power thread now monitors the shutdown process and forces a poweroff if it takes more than 8 seconds.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7517 a1c6a512-1295-4272-9138-f99709370657
2005-09-14 09:08:26 +00:00
Michiel Van Der Kolk
4a271b6bc9 typos fixed...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7287 a1c6a512-1295-4272-9138-f99709370657
2005-08-06 10:30:37 +00:00
Christian Gmeiner
14e80671af iAudio: First unfinished attempt for tlv320 driver and rockbox integration
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7286 a1c6a512-1295-4272-9138-f99709370657
2005-08-06 10:12:19 +00:00
Jens Arnold
9cce5c3727 Adjustment for bootbox.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7107 a1c6a512-1295-4272-9138-f99709370657
2005-07-11 20:29:05 +00:00
Linus Nielsen Feltzing
6e80ac39a5 New poweroff handling, using the SYS_POWEROFF event, allowing plugins to save their settings before powering off.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7019 a1c6a512-1295-4272-9138-f99709370657
2005-07-05 00:03:18 +00:00
Jens Arnold
74d1f72f5d Change current estimation for USB powered mode only if CURRENT_USB is less than CURRENT_NORMAL (Ondio).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6838 a1c6a512-1295-4272-9138-f99709370657
2005-06-23 02:42:28 +00:00
Jens Arnold
97a8049389 New feature for units that can be powered or charged from USB (Recorder fm/v2, Ondios): USB power mode, based on patch #1110332 by Pieter Bos. This way you can save battery power or even charge the battery (fm/v2) while using your unit near a PC. Hold MODE (Ondio) or F1 (fm/v2) while plugging USB to enter that mode. A tiny USB plug icon will be displayed is the status bar (overridden by the regular power plug icon in case of fm/v2 when the charger is connected).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6836 a1c6a512-1295-4272-9138-f99709370657
2005-06-23 02:18:29 +00:00
Marcoen Hirschberg
83b4a83b47 Better values for the iriver battery
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6802 a1c6a512-1295-4272-9138-f99709370657
2005-06-22 11:51:41 +00:00
Daniel Stenberg
9a7ebfda30 ifdef corrections
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6734 a1c6a512-1295-4272-9138-f99709370657
2005-06-17 07:43:46 +00:00
Jens Arnold
de1b915f79 Iriver: Sleep timer now powers off the box even when the charger is connected.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6733 a1c6a512-1295-4272-9138-f99709370657
2005-06-16 23:45:09 +00:00
Jens Arnold
116e4646b0 Proper 'battery level dangerous' handling for Ondio. Moved this info into an array, and removed unused #defines.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6403 a1c6a512-1295-4272-9138-f99709370657
2005-05-04 16:18:09 +00:00
Jens Arnold
06068b451d Bugfixes: (1) Estimated runtime was wrong for approx. 1 minute after boot or battery type/ capacity change because the recalculation was (only) done in the power thread's main loop. (2) Restored Ondio NiMH discharge table. Code cleanup: (1) Moved adjustment for 8MB mod to runcurrent() where it belongs and made it more precise (only adjust the normal current).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6263 a1c6a512-1295-4272-9138-f99709370657
2005-04-10 15:10:44 +00:00
Linus Nielsen Feltzing
43bf39edb7 First lame attempt to show correct battery level on the iRiver
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6258 a1c6a512-1295-4272-9138-f99709370657
2005-04-06 23:53:19 +00:00
Linus Nielsen Feltzing
3d2178148b Moved the car adapter mode handling to apps/, now every thread gets SYS_CHARGER_CONNECTED and SYS_CHARGER_DISCONNECTED events
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6255 a1c6a512-1295-4272-9138-f99709370657
2005-04-06 11:12:22 +00:00
Linus Nielsen Feltzing
8a237a829e More audio code restructuring, mostly renaming functions so far
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6246 a1c6a512-1295-4272-9138-f99709370657
2005-04-04 12:06:29 +00:00
Jörg Hohensohn
853bc3dcf8 sorry, the patch broke all the sims
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6225 a1c6a512-1295-4272-9138-f99709370657
2005-03-24 07:31:59 +00:00
Jörg Hohensohn
3644fa2824 patch # 1159539 from GvB: V1 charging cleanup
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6224 a1c6a512-1295-4272-9138-f99709370657
2005-03-23 20:53:37 +00:00
Linus Nielsen Feltzing
07218e5401 Properly shut down the UDA1380
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6209 a1c6a512-1295-4272-9138-f99709370657
2005-03-18 11:38:47 +00:00
Jörg Hohensohn
d061b371d6 removed the practically useless "trickle charge" and "deep discharge" options, now trickle is always on and deep always off
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6107 a1c6a512-1295-4272-9138-f99709370657
2005-03-03 08:32:55 +00:00
Jörg Hohensohn
2584896920 More aggressive Recorder V1 charging (patch #1116884 from Jerry Van Baren)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6105 a1c6a512-1295-4272-9138-f99709370657
2005-03-03 07:25:43 +00:00
Christi Scarborough
a38947114d Turn off the RTC alarm if it's gone off. Best not to have alarm events unless the user has specifically asked for them.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5973 a1c6a512-1295-4272-9138-f99709370657
2005-02-16 12:18:16 +00:00
Jean-Philippe Bernardy
1798a2043d fixed signedness
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5840 a1c6a512-1295-4272-9138-f99709370657
2005-02-07 22:02:19 +00:00
Christi Scarborough
a83ffb208f A proper alarm clock for the V2/FM (and v1 with mod)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5818 a1c6a512-1295-4272-9138-f99709370657
2005-02-06 17:21:42 +00:00
Christi Scarborough
541e9f6581 fix warnings / sim build
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5816 a1c6a512-1295-4272-9138-f99709370657
2005-02-06 10:16:13 +00:00
Christi Scarborough
e033d7cea7 fix warnings / sim build
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5815 a1c6a512-1295-4272-9138-f99709370657
2005-02-06 10:14:50 +00:00
Christi Scarborough
247fe6d698 clean shutdown for idle timer and sleep timer
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5814 a1c6a512-1295-4272-9138-f99709370657
2005-02-06 09:57:57 +00:00
Linus Nielsen Feltzing
4d7671ce22 Aligned thread stack
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5803 a1c6a512-1295-4272-9138-f99709370657
2005-02-06 02:34:17 +00:00
Jean-Philippe Bernardy
8fd430508a int -> long
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5797 a1c6a512-1295-4272-9138-f99709370657
2005-02-05 10:56:22 +00:00
Daniel Stenberg
39d20cf9b9 include fix
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5753 a1c6a512-1295-4272-9138-f99709370657
2005-02-02 22:05:53 +00:00
Jens Arnold
0457a578b5 Only reset battery level if battery type really changed.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5734 a1c6a512-1295-4272-9138-f99709370657
2005-02-01 18:00:15 +00:00
Jens Arnold
91846a1a8d New Ondio feature: Battery type setting, for correct battery level display.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5717 a1c6a512-1295-4272-9138-f99709370657
2005-01-30 16:25:46 +00:00
Jörg Hohensohn
ef8d508d5a tuner cleanup + improvements:
- use sleep and powerdown for those who can
- philips station search works now


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5306 a1c6a512-1295-4272-9138-f99709370657
2004-10-19 08:20:38 +00:00
Jörg Hohensohn
91f9350cbd moved and renamed fmradio_set/get_status to power.c, where it now additionally serves well for tuner power enable on OndioFM
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5296 a1c6a512-1295-4272-9138-f99709370657
2004-10-17 08:53:18 +00:00
Jens Arnold
672305f0a1 Another small adjustment for Ondio: Don't adjust initial battery level for non-existing HD activity
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5287 a1c6a512-1295-4272-9138-f99709370657
2004-10-15 18:52:54 +00:00
Jens Arnold
c4f96930f0 Adjusted power thread to Ondio: no charging, no car adapter mode, different current values for runtime estimation
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5286 a1c6a512-1295-4272-9138-f99709370657
2004-10-15 18:18:15 +00:00
Jens Arnold
ba0a797b16 No hard-coded minimum capacity any more
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5272 a1c6a512-1295-4272-9138-f99709370657
2004-10-14 00:57:23 +00:00
Jörg Hohensohn
af2d88081a battery levels adjusted for Ondio
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5230 a1c6a512-1295-4272-9138-f99709370657
2004-10-08 21:44:24 +00:00
Jörg Hohensohn
43079ea07f multiple battery types prepared (CONFIG_BATTERY)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5227 a1c6a512-1295-4272-9138-f99709370657
2004-10-08 17:45:52 +00:00
Jörg Hohensohn
593cc00447 a hell of a commit: changed several HAVE_xx configuration flags into multiple choice values (keypad, tuner, CPU, h/w codec)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5126 a1c6a512-1295-4272-9138-f99709370657
2004-09-28 22:13:26 +00:00
Jens Arnold
9478cc6f8a More const policeing step 4
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4983 a1c6a512-1295-4272-9138-f99709370657
2004-08-03 19:22:56 +00:00
Linus Nielsen Feltzing
272d6f11cd Now turns off the backlight when the sleeptimer expires with the charger attached
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4884 a1c6a512-1295-4272-9138-f99709370657
2004-07-15 05:24:34 +00:00
Linus Nielsen Feltzing
bac1ae5aa1 The music now pauses correctly in car adapter mode
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4879 a1c6a512-1295-4272-9138-f99709370657
2004-07-14 11:25:14 +00:00
Linus Nielsen Feltzing
e61f6fa599 Added reset_poweroff_timer(), which can be used to prevent idle poweroff. This is also available in the plugin API.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4787 a1c6a512-1295-4272-9138-f99709370657
2004-06-22 07:16:31 +00:00
Linus Nielsen Feltzing
e3548c3624 The sleep timer now waits until the disk is idle before shutting down
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4737 a1c6a512-1295-4272-9138-f99709370657
2004-06-14 05:03:49 +00:00
Linus Nielsen Feltzing
a258fe1887 Better charging feedback for FM/V2 devices
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4296 a1c6a512-1295-4272-9138-f99709370657
2004-02-05 13:44:04 +00:00
Björn Stenberg
53989844b4 Bug fix: Idle timeout would stop paused playback when charger was connected
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4066 a1c6a512-1295-4272-9138-f99709370657
2003-11-25 12:00:25 +00:00
Björn Stenberg
f6b6db4167 Don't show battery meter until a proper power reading has been done
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4042 a1c6a512-1295-4272-9138-f99709370657
2003-11-19 14:14:41 +00:00
Björn Stenberg
b1c429e6fb Car Ignition Auto Stop (patch #736339 by Craig Sather)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3976 a1c6a512-1295-4272-9138-f99709370657
2003-10-17 14:49:00 +00:00
Björn Stenberg
3953211531 Fixes sleep timer when connected to charger (patch #769591 by Henrik Backe)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3975 a1c6a512-1295-4272-9138-f99709370657
2003-10-17 14:05:32 +00:00
Björn Stenberg
fa7653cde0 Removed the battery level rise limiter. This provides more accurate values the minutes after booting.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3962 a1c6a512-1295-4272-9138-f99709370657
2003-09-22 13:26:24 +00:00
Linus Nielsen Feltzing
53ee344743 Slightly more correct initialization of the power/charging code
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3940 a1c6a512-1295-4272-9138-f99709370657
2003-08-25 08:57:49 +00:00
Uwe Freese
056439e59d Measured voltages for LiIon. I found rockbox-liion.gif
somewhere, didn't know where anymore. Thanks to the one who measured the values.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3936 a1c6a512-1295-4272-9138-f99709370657
2003-08-21 08:49:57 +00:00
Björn Stenberg
2bcb3dfccc Report max 99% battery level during charging
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3738 a1c6a512-1295-4272-9138-f99709370657
2003-06-09 21:02:13 +00:00
Björn Stenberg
b817f601ba Make simulator report 75% battery instead of 100%
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3724 a1c6a512-1295-4272-9138-f99709370657
2003-06-04 13:16:34 +00:00
Linus Nielsen Feltzing
23b0fdaca1 Idle poweroff fix for FM radio, as suggested by Mike Holden
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3645 a1c6a512-1295-4272-9138-f99709370657
2003-05-03 15:39:40 +00:00
Björn Stenberg
b443ba46ec Don't reboot if charger is connected when sleep timer expires, just stop the music.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3397 a1c6a512-1295-4272-9138-f99709370657
2003-03-07 14:13:58 +00:00
Daniel Stenberg
2573879fb1 Massively code-policed. We keep source lines less than 80 columns...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3378 a1c6a512-1295-4272-9138-f99709370657
2003-03-04 05:59:38 +00:00
Uwe Freese
63e97b66e0 estimate 22 percent longer runtime when having 8 MB, assuming 192 kbps files again
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3372 a1c6a512-1295-4272-9138-f99709370657
2003-03-03 13:23:11 +00:00
Uwe Freese
5e44a56b65 disable charge control for FM
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3239 a1c6a512-1295-4272-9138-f99709370657
2003-02-12 22:21:07 +00:00
Uwe Freese
8ed1a3a409 LiIon values for FM
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3169 a1c6a512-1295-4272-9138-f99709370657
2003-01-27 11:27:44 +00:00
Uwe Freese
8ee6275a06 Start new charge cycle should be possible in trickle mode. This should fix the battries getting empty in USB mode.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3129 a1c6a512-1295-4272-9138-f99709370657
2003-01-19 20:42:09 +00:00
Uwe Freese
430a354dfe better estimated running time for usb mode
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3047 a1c6a512-1295-4272-9138-f99709370657
2003-01-09 20:16:37 +00:00
Uwe Freese
4bc287d34a battery level 100% when trickle chg, only 1% per minute change allowed, ignore 25 min. after charge start/stop, get rid of old lazyness table (I hope this makes the battery display less confusing to the user, charging algo. is not affected\!)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3017 a1c6a512-1295-4272-9138-f99709370657
2002-12-18 18:55:50 +00:00
Kjell Ericson
51f18b083a Fixed a simulator stub for set_battery_capacity()
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3012 a1c6a512-1295-4272-9138-f99709370657
2002-12-17 09:26:51 +00:00
Uwe Freese
0bf70e65e8 battery capacity (1500-2400 in 50mAh steps) saved to disk
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3008 a1c6a512-1295-4272-9138-f99709370657
2002-12-16 22:58:48 +00:00
Uwe Freese
ae1ba1d5de stupid bug, trickle setting in menu didn't work
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3007 a1c6a512-1295-4272-9138-f99709370657
2002-12-16 15:02:23 +00:00
Uwe Freese
f3d010a057 charger on if battery low at boot time, battery capacity settings
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3000 a1c6a512-1295-4272-9138-f99709370657
2002-12-15 18:08:06 +00:00
Uwe Freese
c29b538440 battery capacity setting function
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2997 a1c6a512-1295-4272-9138-f99709370657
2002-12-14 22:46:00 +00:00
Uwe Freese
e2a6aee661 we don't want battery symbol flickering while trickle charging
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2996 a1c6a512-1295-4272-9138-f99709370657
2002-12-14 22:20:56 +00:00
Uwe Freese
207f4d20f2 no inclusion of apps/settings.h anymore (simulator build error), new enable_trickle_charge function
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2995 a1c6a512-1295-4272-9138-f99709370657
2002-12-14 22:05:01 +00:00
Uwe Freese
0f30f66c6c max charge duration now depends on batt. capacity and is a little longer
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2992 a1c6a512-1295-4272-9138-f99709370657
2002-12-14 21:01:32 +00:00
Uwe Freese
48e8e98efa using the new charge state variable instead of trickle_enable
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2991 a1c6a512-1295-4272-9138-f99709370657
2002-12-14 15:48:08 +00:00
Uwe Freese
5f02797b2e added trickle charge
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2982 a1c6a512-1295-4272-9138-f99709370657
2002-12-14 12:10:29 +00:00
Linus Nielsen Feltzing
d41942e12f Sleeptimer now reboots instead of poweroff when charger is attached
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2926 a1c6a512-1295-4272-9138-f99709370657
2002-12-04 12:53:10 +00:00
Linus Nielsen Feltzing
b43dba8760 Sleep timer, inspired by Jim Hagani
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2918 a1c6a512-1295-4272-9138-f99709370657
2002-12-03 22:41:50 +00:00
Björn Stenberg
040816d173 Fixed build.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2914 a1c6a512-1295-4272-9138-f99709370657
2002-12-03 14:33:20 +00:00
Björn Stenberg
f09c5f4c63 Finally, merged the improved power code from Uwe Freese:
- The battery level (percentage) is more realistic and considers if the charger is on.
- It considers the "lazyness" a battery shows when the charging has just turned on or off (see below). But this is not perfect by now.
- The battery level is good enough to estimate the remaining running time and the remaining charging time. And so the info screen now shows this info.
- The maximum time of a charging cycle is now dynamically calculated out of the battery level (percentage) and is not a fixed value.
- A minimum of 60 minutes is waited after a charging cycle stops before another one starts.
- Added another screen in the battery debug screen (press down three times).


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2913 a1c6a512-1295-4272-9138-f99709370657
2002-12-03 14:18:51 +00:00
Linus Nielsen Feltzing
a05d2f490d Auto-poweroff restarts the timeout when extracting the charger
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2428 a1c6a512-1295-4272-9138-f99709370657
2002-09-26 22:34:35 +00:00
Linus Nielsen Feltzing
1665811d33 Don't auto-poweroff if USB is inserted
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2418 a1c6a512-1295-4272-9138-f99709370657
2002-09-25 19:25:10 +00:00
Linus Nielsen Feltzing
868111c5c1 Now powers off when the music is paused
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2381 a1c6a512-1295-4272-9138-f99709370657
2002-09-24 07:50:17 +00:00
Linus Nielsen Feltzing
2f4e36abd5 Simulator fix
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2375 a1c6a512-1295-4272-9138-f99709370657
2002-09-23 12:21:51 +00:00
Linus Nielsen Feltzing
083a6dbc4e Auto-poweroff, by Lee Marlow
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2374 a1c6a512-1295-4272-9138-f99709370657
2002-09-23 11:42:48 +00:00
Heikki Hannikainen
fdb44c9175 Reset the power history with the latest value when starting charging
so that we don't use values before discharge for the long-term delta
calculation.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1899 a1c6a512-1295-4272-9138-f99709370657
2002-08-21 20:06:41 +00:00
Heikki Hannikainen
dd2bae49eb avoid flickering of battery level during the first minute of uptime by taking a voltage sample at power_init
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1758 a1c6a512-1295-4272-9138-f99709370657
2002-08-15 11:32:01 +00:00
Heikki Hannikainen
9872b66cd1 Use average of two samples at both ends of the range for calculating smoother delta values.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1716 a1c6a512-1295-4272-9138-f99709370657
2002-08-13 16:06:29 +00:00
Heikki Hannikainen
a4cb4aff7b Tune charging algorithm: use more voltage samples (4 per minute) and discard
samples taken while the disk is spinning. If no 'disk idle' samples are
available, use the ones we have anyway (yeah, maybe we could interpolate too).
Also tuned the deltas detection too, and fixed some comments. This seems to
work quite a bit better for me.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1682 a1c6a512-1295-4272-9138-f99709370657
2002-08-12 12:19:25 +00:00
Heikki Hannikainen
38c8a83779 Made battery_level() use the power history table to get an average battery level over the last 3 minutes.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1589 a1c6a512-1295-4272-9138-f99709370657
2002-08-07 11:30:39 +00:00
Linus Nielsen Feltzing
aba19c95b7 Removed a warning
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1558 a1c6a512-1295-4272-9138-f99709370657
2002-08-06 13:06:41 +00:00
Heikki Hannikainen
3f809e716d Added battery charger code for the recorder and battery voltage statistics keeping for all platforms.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1546 a1c6a512-1295-4272-9138-f99709370657
2002-08-06 10:50:50 +00:00