Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: [PATCH] Battery voltage stats for the recorder
From: Heikki Hannikainen (hessu_at_hes.iki.fi)
Date: 2002-07-24


  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 was last modified "Jan 10 2012" The Rockbox Crew
aaa