|
Rockbox mail archiveSubject: [PATCH] Battery voltage stats for the recorder[PATCH] Battery voltage stats for the recorder
From: Heikki Hannikainen <hessu_at_hes.iki.fi>
Date: Wed, 24 Jul 2002 11:37:13 +0300 (EEST) Hi, Here's a patch that adds a power_thread (drivers/powermgmt.[ch]) which keeps a history, 1 sample per minute, of the battery voltage. It also adds a debug menu item for viewing an automatically scaled graph of the voltage on the bitmap display. I don't know if it makes sense to commit this to the CVS yet, I'm just posting the patch in case people would like to comment on it or play with it. It probably doesn't hurt to commit. This code can be used as a starting point for: - better battery_level() which exports a filtered battery status for the battery icon, currently it flickers too much (linus suggested) - calculating a rate of voltage change - charging logic on the recorder (the players have hardware charging so this is not needed / cannot be done) - calculating a sliding average of the voltage point where the battery reaches 'full' level (usable for estimating the charging time required/left) - calculating a sliding average of the voltage where the hard disk starts to have lots of errors, so that we know when to write protect it (this varies per unit) and estimate the amount of battery time left. The sliding averages could be saved to the config block. Known issues: - the thread should be enabled for players too, only the viewer won't work on the player. - Hessu
Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy |