LibreSolar / charge-controller-firmware

Firmware for Libre Solar MPPT/PWM charge controllers
https://libre.solar/charge-controller-firmware/
Apache License 2.0
144 stars 71 forks source link

Stop energy counter when disabled #100

Closed JordanSilverman closed 4 years ago

JordanSilverman commented 4 years ago

Okay - started again:

This ensures that energy counters for hv, pwm switch and load outputs only update when those ports are active.

Doing this because when there is no current through the port, sometimes the energy counter in increased due to inaccuracies in the current counter. Particularly the load output counter could be used for billing purposes and inaccuracy is not ideal.

Edits were made in the control thread in main.cpp