From ba112b379bac4bfbb120f3e3d3796f195a026098 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xose=20P=C3=A9rez?= Date: Tue, 25 Apr 2017 12:59:28 +0200 Subject: [PATCH] Fix bug in getCurrent method, thanks Emmanuel Tatto --- code/espurna/pow.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/espurna/pow.ino b/code/espurna/pow.ino index bf11624b..488fb350 100644 --- a/code/espurna/pow.ino +++ b/code/espurna/pow.ino @@ -114,7 +114,7 @@ unsigned int getReactivePower() { double 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; }