FreeCalypso > hg > fc-magnetite
changeset 340:2f41f7883261
FCHG: logic error in the charge (re)start condition
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 15 Dec 2017 18:57:05 +0000 |
parents | 2990f590d368 |
children | 651778900ec1 |
files | src/cs/drivers/drv_app/fchg/fchg_process.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/cs/drivers/drv_app/fchg/fchg_process.c Thu Dec 14 23:09:56 2017 +0000 +++ b/src/cs/drivers/drv_app/fchg/fchg_process.c Fri Dec 15 18:57:05 2017 +0000 @@ -148,7 +148,7 @@ pwr_ctrl->state = FCHG_STATE_NO_EXT_PWR; return; } - if (pwr_ctrl->batt_mv >= pwr_ctrl->config.start_thresh) + if (pwr_ctrl->batt_mv < pwr_ctrl->config.start_thresh) start_charge_condition_met(); return; case FCHG_STATE_READY_TO_RECHARGE: @@ -157,7 +157,7 @@ pwr_ctrl->state = FCHG_STATE_NO_EXT_PWR; return; } - if (pwr_ctrl->batt_mv >= pwr_ctrl->config.restart_thresh) + if (pwr_ctrl->batt_mv < pwr_ctrl->config.restart_thresh) start_charge_condition_met(); return; case FCHG_STATE_I2V_CAL_1: