Rockbox Technical Forums

Rockbox Development => Feature Ideas => Topic started by: dontmind on September 07, 2008, 12:15:39 PM

Title: battery capacity options: make lower capacity selectable?
Post by: dontmind on September 07, 2008, 12:15:39 PM
hi there,

i ran into some problem with my quite old iriver h120: the battery isn't the newest one, so it actually never charges to 100% and, what's worse, just stops working sometimes when (so it says) 20% charged.

so i thougt about changing the capacity in the options menu. but only the default of 1300 mAh (for h120) or higher values are selectable.

so what about including lower selectable capacities for worn off batteries?

like this:
Code: [Select]
--- config-h120.h       2008-09-07 18:07:25.000000000 +0200
+++ config-h120.h.new   2008-09-07 18:14:27.000000000 +0200
@@ -100,7 +100,7 @@
 #define HAVE_AGC
 
 #define BATTERY_CAPACITY_DEFAULT 1300 /* default battery capacity */
-#define BATTERY_CAPACITY_MIN 1300 /* min. capacity selectable */
+#define BATTERY_CAPACITY_MIN 800 /* min. capacity selectable */
 #define BATTERY_CAPACITY_MAX 3200 /* max. capacity selectable */
 #define BATTERY_CAPACITY_INC 50   /* capacity increment */
 #define BATTERY_TYPES_COUNT  1    /* only one type */

thanks,
christian

Title: Re: battery capacity options: make lower capacity selectable?
Post by: saratoga on September 07, 2008, 12:31:30 PM
The battery capacity setting is actually only for the runtime estimation, not the battery meter.  So if you half the battery size, it won't change what the meter says, but the run time remaining will be halved.

The battery charge meter is actually estimated using the battery voltage.  Someday we should probably make the battery bench plugin automatically update the battery voltage table, but for now you'd have to manually look at the results of a battery bench, and put the voltages it gives into the rockbox source code.