forked from len0rd/rockbox
Gigabeat S: Use longer battery filter; lag is not a problem with voltage for charging since it's I-controlled. Initialize local copy of last_inputs for the power routines in target init otherwise the battery filter is reinitialized too soon.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26180 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
29e70dfcb8
commit
9594f86c1a
2 changed files with 3 additions and 1 deletions
|
|
@ -608,6 +608,8 @@ static bool charging_ok(void)
|
||||||
|
|
||||||
void powermgmt_init_target(void)
|
void powermgmt_init_target(void)
|
||||||
{
|
{
|
||||||
|
last_inputs = power_thread_inputs;
|
||||||
|
|
||||||
#ifdef IMX31_ALLOW_CHARGING
|
#ifdef IMX31_ALLOW_CHARGING
|
||||||
const uint32_t regval_w =
|
const uint32_t regval_w =
|
||||||
MC13783_VCHRG_4_050V | MC13783_ICHRG_0MA |
|
MC13783_VCHRG_4_050V | MC13783_ICHRG_0MA |
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,7 @@
|
||||||
#define BATTERY_VMAINTAIN_USB MC13783_VCHRG_4_150V
|
#define BATTERY_VMAINTAIN_USB MC13783_VCHRG_4_150V
|
||||||
|
|
||||||
/* Battery filter lengths in samples */
|
/* Battery filter lengths in samples */
|
||||||
#define BATT_AVE_SAMPLES 32
|
#define BATT_AVE_SAMPLES 128
|
||||||
#define ICHARGER_AVE_SAMPLES 32
|
#define ICHARGER_AVE_SAMPLES 32
|
||||||
|
|
||||||
void powermgmt_init_target(void);
|
void powermgmt_init_target(void);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue