Whenever overload is detected, the time that must pass before the load is
turned on again is doubled. If the load was on for 5 minutes, the retry time is
reset to the configured value.
This change controls a GPIO on the expansion connector depending on the
surrounding temperature. If external temperature is too low for
charging, the GPIO is set high, else it is set low.
In combination with the new LNSC-2420-Addon board this allows to switch
on a high-power heater connected directly to the solar panels whenever
the temperature is too low to charge the battery. Once the temperature
becomes high enough again, the heater is switched off and the battery is
charged instead.
Before this change, initial charging ended exactly HOLD_TIME after the
CHARGE_INITIAL state was entered. This was usually not sufficient to
reach the INITIAL_FULL voltage. Now a new state is entered once the
INITIAL_FULL voltage is reached.
The measurement module now provides averaged measurements. These are
used in some places where accuracy is more important than latency (for
example for the temperature limit, where noise triggered the limit too
early).