From 36b226051fa0a77652d3546cd628337588ffa871 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xose=20P=C3=A9rez?= Date: Mon, 23 Oct 2017 10:53:22 +0200 Subject: [PATCH] Fix getPowerEnergy scope --- code/espurna/power.ino | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/code/espurna/power.ino b/code/espurna/power.ino index 2520a5bd..b6752ebd 100644 --- a/code/espurna/power.ino +++ b/code/espurna/power.ino @@ -270,6 +270,10 @@ double getApparentPower() { return roundTo(_power_apparent, POWER_POWER_DECIMALS); } +double getPowerEnergy() { + roundTo(_power_energy, POWER_ENERGY_DECIMALS); +} + #if POWER_HAS_ACTIVE double getActivePower() { return roundTo(_power_active, POWER_POWER_DECIMALS); @@ -283,9 +287,6 @@ double getPowerFactor() { return roundTo(_power_factor, 2); } -double getPowerEnergy() { - roundTo(_power_energy, POWER_ENERGY_DECIMALS); -} #endif // -----------------------------------------------------------------------------