Zuntara / Arduino.Pentair

Arduino code for Pentair Intelliflo Wisperflo VS(D)
MIT License
22 stars 0 forks source link

Division by zero on esp8266 / % formula incorrect #6

Open gesquiel opened 6 years ago

gesquiel commented 6 years ago

Pentair.cpp line ~196 has: if ((abs((watts - _currentPumpStatus[pump].watts) / watts)) > .05) { should be: if ((abs((watts - _currentPumpStatus[pump].watts) / 100)) > .05) {

as watts can be 0 causing div by zero but anyway % calcs are done wrong.

Zuntara commented 2 years ago

whoops :) can you send a pull request? If not I will try to change it once I have time again :)