> minute later. That happened here several times with charging really
> empty batteries (where the charging stopped in the middle of the whole
> charging time because of a low gradient).

Hm, what was the voltage and did it stop with low or negative delta?
Interesting, I haven't seen this happening with my batteries (completely
discharged or not). My batteries are pretty new, though.

> Disabling charging for one minute disturbs the calculation of the
> voltages and deltas and is not so nice.

It doesn't disturb that, since batteries are charged for at least
CHARGE_MIN_TIME (10) minutes before deltas are calculated or checked. This
is intended to get over the erroneus voltage drops when starting to charge
empty/old batteries. But wait, you're right - CHARGE_END_ZEROD is now 30
minutes and the voltage might well have been higher 30 minutes ago if the
unit was not powered down before it got the charger attached! I wonder if
we should clear the history when starting charging? This might just fix
the problem.

> Add a BATTERY_LEVEL_CHARGE_END.
> Do not stop charging until voltage > BATTERY_LEVEL_CHARGE_END.

I don't think this is a good idea, as we might end up charging some
bad/old batteries forever. We do not really know the full/empty levels of
a given battery set before measuring the individual cells.