If the charger is doing a bulk charge, it'll likely be dumping high
current into the battery, resulting in a high voltage appearing at the
terminals.
We don't want to disturb this… we want to wait until the charger thinks
it's done, which it signifies by turning off. We should see the voltage
drop back and continue falling. If we're above our "high" threshold at
this point, *then* we might consider leaving it off.
We should delay our shutdown in case the charger decides to ramp down
itself. Otherwise we can get the situation where a smart charger starts
high, tripping the high threshold immediately, leading to the controller
and charger oscillating between on and off.
This will get copied over to setpoints.h, where the developer can
customise them. If they do so, and I have to change things, the
Makefile will warn them of this.
It appears the minimum PWM is more strongly dependent on battery voltage
than I had planned, it needs to be just a little higher to ensure the
fan keeps turning at low RPM.
- Adjust the calculations so that we base our initial PWM at 0 then
clamp to minimum PWM
- Implement a fan kick-start mode
- Start with fan off so kick-start mode works