(Awesome project, by the way - thanks so much for sharing!)
The correct functioning of the high-pass filter in EnergyMonitor::calcVI() relies on the previous values for filteredI and filteredV being sane. But these variables are uninitialised when the code starts running; hence they will be set to a random value at power-on!
(Awesome project, by the way - thanks so much for sharing!)
The correct functioning of the high-pass filter in
EnergyMonitor::calcVI()
relies on the previous values forfilteredI
andfilteredV
being sane. But these variables are uninitialised when the code starts running; hence they will be set to a random value at power-on!Here's a patch with a simple fix: https://github.com/JackKelly/EmonLib/commit/e10bfdff206e4e70e04afdfd0fdb698c33abe73a