diff options
author | Jörg Hohensohn <hohensoh@rockbox.org> | 2005-03-23 20:53:37 +0000 |
---|---|---|
committer | Jörg Hohensohn <hohensoh@rockbox.org> | 2005-03-23 20:53:37 +0000 |
commit | 3644fa28245d84b7bccc65661ca6640f029c000c (patch) | |
tree | c0fa52d31f60c9ea7d8b660e489ada6b062563e5 /firmware/export/powermgmt.h | |
parent | 9306caae3df85abecc1a7990d73c89c570d37d79 (diff) | |
download | rockbox-3644fa28245d84b7bccc65661ca6640f029c000c.tar.gz rockbox-3644fa28245d84b7bccc65661ca6640f029c000c.zip |
patch # 1159539 from GvB: V1 charging cleanup
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6224 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export/powermgmt.h')
-rw-r--r-- | firmware/export/powermgmt.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/firmware/export/powermgmt.h b/firmware/export/powermgmt.h index 3bccb0f59f..ccfdede9f9 100644 --- a/firmware/export/powermgmt.h +++ b/firmware/export/powermgmt.h | |||
@@ -57,12 +57,13 @@ | |||
57 | #ifndef SIMULATOR | 57 | #ifndef SIMULATOR |
58 | 58 | ||
59 | #ifdef HAVE_CHARGE_CTRL | 59 | #ifdef HAVE_CHARGE_CTRL |
60 | #define START_TOPOFF_CHG 85 /* Battery % to start at top-off */ | ||
61 | #define START_TRICKLE_CHG 95 /* Battery % to start at trickle */ | ||
62 | |||
60 | #define POWER_MESSAGE_LEN 32 /* power thread status message */ | 63 | #define POWER_MESSAGE_LEN 32 /* power thread status message */ |
61 | #define CHARGE_MAX_TIME_1500 450 /* minutes: maximum charging time for 1500 mAh batteries */ | 64 | #define CHARGE_MAX_TIME_1500 450 /* minutes: maximum charging time for 1500 mAh batteries */ |
62 | /* actual max time depends also on BATTERY_CAPACITY! */ | 65 | /* actual max time depends also on BATTERY_CAPACITY! */ |
63 | #define CHARGE_MIN_TIME 10 /* minutes: minimum charging time */ | 66 | #define CHARGE_MIN_TIME 10 /* minutes: minimum charging time */ |
64 | #define CHARGE_RESTART 85 /* %: when to restart charging in 'charge' mode */ | ||
65 | /* attention: if set too high, normal charging is started in trickle mode */ | ||
66 | #define TOPOFF_MAX_TIME 90 /* After charging, go to top off charge. How long should top off charge be? */ | 67 | #define TOPOFF_MAX_TIME 90 /* After charging, go to top off charge. How long should top off charge be? */ |
67 | #define TOPOFF_VOLTAGE 565 /* which voltage is best? (centivolts) */ | 68 | #define TOPOFF_VOLTAGE 565 /* which voltage is best? (centivolts) */ |
68 | #define TRICKLE_MAX_TIME 12*60 /* After top off charge, go to trickle charge. How long should trickle charge be? */ | 69 | #define TRICKLE_MAX_TIME 12*60 /* After top off charge, go to trickle charge. How long should trickle charge be? */ |
@@ -71,6 +72,9 @@ | |||
71 | #define START_TOPOFF_SEC 25 /* initial trickle_sec for topoff */ | 72 | #define START_TOPOFF_SEC 25 /* initial trickle_sec for topoff */ |
72 | #define START_TRICKLE_SEC 15 /* initial trickle_sec for trickle */ | 73 | #define START_TRICKLE_SEC 15 /* initial trickle_sec for trickle */ |
73 | 74 | ||
75 | #define PID_PCONST 2 /* PID proportional constant */ | ||
76 | #define PID_DEADZONE 2 /* PID proportional deadzone */ | ||
77 | |||
74 | extern char power_message[POWER_MESSAGE_LEN]; | 78 | extern char power_message[POWER_MESSAGE_LEN]; |
75 | 79 | ||
76 | extern int long_delta; /* long term delta battery voltage */ | 80 | extern int long_delta; /* long term delta battery voltage */ |
@@ -79,6 +83,8 @@ extern int short_delta; /* short term delta battery voltage */ | |||
79 | extern int powermgmt_last_cycle_startstop_min; /* how many minutes ago was the charging started or stopped? */ | 83 | extern int powermgmt_last_cycle_startstop_min; /* how many minutes ago was the charging started or stopped? */ |
80 | extern int powermgmt_last_cycle_level; /* which level had the batteries at this time? */ | 84 | extern int powermgmt_last_cycle_level; /* which level had the batteries at this time? */ |
81 | 85 | ||
86 | extern int pid_p; /* PID proportional term */ | ||
87 | extern int pid_i; /* PID integral term */ | ||
82 | extern int trickle_sec; /* trickle charge: How many seconds per minute are we charging actually? */ | 88 | extern int trickle_sec; /* trickle charge: How many seconds per minute are we charging actually? */ |
83 | 89 | ||
84 | #endif /* HAVE_CHARGE_CTRL */ | 90 | #endif /* HAVE_CHARGE_CTRL */ |