diff src/cs/drivers/drv_app/fchg/fchg_process.c @ 360:ce6d71349af0

FCHG: data structure changes in preparation for the new version
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 29 Dec 2017 05:42:54 +0000
parents 2f41f7883261
children 4c3d05866531
line wrap: on
line diff
--- a/src/cs/drivers/drv_app/fchg/fchg_process.c	Fri Dec 29 03:20:34 2017 +0000
+++ b/src/cs/drivers/drv_app/fchg/fchg_process.c	Fri Dec 29 05:42:54 2017 +0000
@@ -97,7 +97,7 @@
 	ABB_Write_Register_on_page(PAGE0, BCICTL2, 0);
 	/* figure out the DAC code */
 	while (code &&
-	       madc_vbat_2_physical(code) >= pwr_ctrl->config.charge_to_mv)
+	       madc_vbat_2_physical(code) >= pwr_ctrl->config.cv_init_set)
 		code--;
 	code++;
 	rvf_send_trace("Voltage (DAC code) ", 19, code,
@@ -193,7 +193,7 @@
 		}
 		if (overvoltage_end_charge_check())
 			return;
-		if (pwr_ctrl->batt_mv >= pwr_ctrl->config.charge_to_mv)
+		if (pwr_ctrl->batt_mv >= pwr_ctrl->config.ci2cv_thresh)
 			start_cv_charging(msg->data[0]);
 		return;
 	case FCHG_STATE_CV_CHARGING: