The following pull-request addresses and fixes several bugs/feature enhancements.
Specifically,
timestamp column fixed to be of type DATETIME rather than TXT #346
Extra colunn grandtotal added to calculate corrected total net of restarts int total column #344
Entries to energy_data.db are only added if: total changed, current power > 0 or has changed (this captures return to zero) #345
KWH cost for completed prints is fixed #349
The code covers the following 3 situations:
New energy_data.db creation (one-time)
Modification/update of existing energy_data.db (one-time to be consistent with above)
Ongoing running and data capture
Note that I was maximally "liberal" in retaining rows that have information - the only rows discarded are rows with zero power and no changes in total or that are not the first return to zero power (the final element is included so that you know when power shuts off)
The GUI now reflects 'grandtotal' by passing that value to the javascript routines.
Let me know if you have any questions or concerns with any of the individual code changes.
The following pull-request addresses and fixes several bugs/feature enhancements.
Specifically,
timestamp
column fixed to be of typeDATETIME
rather thanTXT
#346grandtotal
added to calculate corrected total net of restarts inttotal
column #344energy_data.db
are only added if:total
changed, currentpower
> 0 or has changed (this captures return to zero) #345The code covers the following 3 situations:
energy_data.db
creation (one-time)energy_data.db
(one-time to be consistent with above)Note that I was maximally "liberal" in retaining rows that have information - the only rows discarded are rows with zero
power
and no changes intotal
or that are not the first return to zeropower
(the final element is included so that you know when power shuts off)The GUI now reflects 'grandtotal' by passing that value to the javascript routines.
Let me know if you have any questions or concerns with any of the individual code changes.