Browse Source

Fix bug in getCurrent method, thanks Emmanuel Tatto

fastled
Xose Pérez 7 years ago
parent
commit
ba112b379b
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      code/espurna/pow.ino

+ 1
- 1
code/espurna/pow.ino View File

@ -114,7 +114,7 @@ unsigned int getReactivePower() {
double getCurrent() { double getCurrent() {
double current = hlw8012.getCurrent(); double current = hlw8012.getCurrent();
if (POW_MIN_CURRENT > current || current > POW_MAX_CURRENT) power = 0;
if (POW_MIN_CURRENT > current || current > POW_MAX_CURRENT) current = 0;
return current; return current;
} }


Loading…
Cancel
Save