diff options
Diffstat (limited to 'firmware/powermgmt.c')
-rw-r--r-- | firmware/powermgmt.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c index e4330a48c0..8f4f22fb3f 100644 --- a/firmware/powermgmt.c +++ b/firmware/powermgmt.c | |||
@@ -140,7 +140,10 @@ static const short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = | |||
140 | { 310, 355, 363, 369, 372, 374, 376, 378, 380, 386, 405 } /* NiMH */ | 140 | { 310, 355, 363, 369, 372, 374, 376, 378, 380, 386, 405 } /* NiMH */ |
141 | #elif CONFIG_BATTERY == BATT_LIPOL1300 | 141 | #elif CONFIG_BATTERY == BATT_LIPOL1300 |
142 | /* Below 337 the backlight starts flickering during HD access */ | 142 | /* Below 337 the backlight starts flickering during HD access */ |
143 | { 337, 358, 365, 369, 372, 377, 383, 389, 397, 406, 413 } | 143 | /* Calibrated for Ionity 1900 mAh battery. If necessary, re-calibrate |
144 | * for the 1300 mAh stock battery. */ | ||
145 | // { 337, 358, 365, 369, 372, 377, 383, 389, 397, 406, 413 } | ||
146 | { 337, 366, 372, 374, 378, 381, 385, 392, 399, 408, 417 } | ||
144 | #else /* NiMH */ | 147 | #else /* NiMH */ |
145 | /* original values were taken directly after charging, but it should show | 148 | /* original values were taken directly after charging, but it should show |
146 | 100% after turning off the device for some hours, too */ | 149 | 100% after turning off the device for some hours, too */ |
@@ -156,7 +159,9 @@ charger_input_state_type charger_input_state IDATA_ATTR; | |||
156 | static const short percent_to_volt_charge[11] = | 159 | static const short percent_to_volt_charge[11] = |
157 | { | 160 | { |
158 | #if CONFIG_BATTERY == BATT_LIPOL1300 | 161 | #if CONFIG_BATTERY == BATT_LIPOL1300 |
159 | 340, 349, 358, 367, 376, 385, 394, 403, 408, 413, 418 /* Estimated */ | 162 | /* Calibrated for 1900 mAh Ionity battery (estimated 90% charge when |
163 | entering in trickle-charging). We will never reach 100%. */ | ||
164 | 340, 390, 394, 399, 400, 404, 407, 413, 417, 422, 426 | ||
160 | #else | 165 | #else |
161 | /* values guessed, see | 166 | /* values guessed, see |
162 | http://www.seattlerobotics.org/encoder/200210/LiIon2.pdf until someone | 167 | http://www.seattlerobotics.org/encoder/200210/LiIon2.pdf until someone |
@@ -533,8 +538,8 @@ static void power_thread_sleep(int ticks) | |||
533 | #ifdef HAVE_CHARGE_STATE | 538 | #ifdef HAVE_CHARGE_STATE |
534 | switch (charger_input_state) { | 539 | switch (charger_input_state) { |
535 | case CHARGER_UNPLUGGED: | 540 | case CHARGER_UNPLUGGED: |
536 | charge_state = DISCHARGING; | ||
537 | case NO_CHARGER: | 541 | case NO_CHARGER: |
542 | charge_state = DISCHARGING; | ||
538 | break; | 543 | break; |
539 | case CHARGER_PLUGGED: | 544 | case CHARGER_PLUGGED: |
540 | case CHARGER: | 545 | case CHARGER: |