From a66237689241c84a33db26066b86ad9543ea9f12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xose=20P=C3=A9rez?= Date: Mon, 5 Dec 2016 16:52:32 +0100 Subject: [PATCH] Fix settings rename in emon module --- code/src/emon.ino | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/code/src/emon.ino b/code/src/emon.ino index 6202e996..c01ab157 100644 --- a/code/src/emon.ino +++ b/code/src/emon.ino @@ -38,9 +38,12 @@ unsigned int currentCallback() { void powerMonitorSetup() { // backwards compatibility - setSetting("emonMains", getSetting("pwMainsVoltage", EMON_MAINS_VOLTAGE)); - setSetting("emonRatio", getSetting("pwCurrentRatio", EMON_CURRENT_RATIO)); + String tmp; + tmp = getSetting("pwMainsVoltage", String() + EMON_MAINS_VOLTAGE); + setSetting("emonMains", tmp); delSetting("pwMainsVoltage"); + tmp = getSetting("pwCurrentRatio", String() + EMON_CURRENT_RATIO); + setSetting("emonRatio", tmp); delSetting("pwCurrentRatio"); emon.initCurrent(