|
|
@@ -130,20 +130,10 @@ int main(void)
|
|
|
for(uint8_t slot_id= 0; slot_id< NUM_SLOTS; slot_id++){
|
|
|
//GET battery measurement from the Target
|
|
|
getBatteryMeasurement(slot_id);
|
|
|
-
|
|
|
//Reading battery state:
|
|
|
Battery_StateCondition(slot_id);
|
|
|
printf("Battery State: %d, Charging State:%d\n", battery_data[slot_id].battery_state, battery_data[slot_id].battery_charging_state);
|
|
|
CC_CV_ControlCharging(slot_id);
|
|
|
- //If target received battery limits from Pi then start charging, else wait with state: 3::
|
|
|
- /*if(battery_data[slot_id].batteryLimitReceived){
|
|
|
- printf("Battery Limits: Slot: %d, Max Voltage:%u, Min Voltage:%u, "
|
|
|
- "Cutoff Current: %u, Capacitance:%u, Charge Fraction:%u, Cycle Number: %u\n", slot_id, battery_data[slot_id].max_voltage,
|
|
|
- battery_data[slot_id].min_voltage, battery_data[slot_id].cut_off_current,
|
|
|
- battery_data[slot_id].capacitance, battery_data[slot_id].charge_fraction, battery_data[slot_id].cycle_number);
|
|
|
-
|
|
|
- }*/
|
|
|
-
|
|
|
delay_cycles(MEASUREMENT_CHECK_INTERVAL);
|
|
|
|
|
|
}
|