lincomatic / open_evse

Firmware for Open EVSE
GNU General Public License v3.0
114 stars 163 forks source link

Clear kwh sequence #49

Closed Mike4U closed 8 years ago

Mike4U commented 8 years ago

Clear g_WattSeconds only after adding to g_WattHours_accumulated and only when state changes from A to B i.e. from unconnected to connected.
The reasoning?

  1. From a programming standpoint kwhs aren’t lost if always accumulated before clearing.
  2. The user can look at the display at any time and see how many kw have been consumed, even and especially after unplugging. Zeroing the kwsecs should only happen when the user first plugs in to the car. Messing with the button and menus shouldn’t effect the kw value (unless in that menu) wether charging or not. Any failures or faults shouldn’t clear the accumulated kw.
lincomatic commented 8 years ago

Thank you for the pull request. I'm waiting for CraigK to review it, as he is the author of the overtemperature code. In the future, please submit pull requests only to the development branch, as the stable branch is only for promoted code from the development branch.

Mike4U commented 8 years ago

Sorry, can't Git my head around using GitHub. I'm going to close this pull request and try to do into the development branch.