From 833d89203f643fac9db10f6409754892cfb7cef2 Mon Sep 17 00:00:00 2001 From: George Date: Wed, 20 May 2020 12:38:24 +1000 Subject: [PATCH] Fix settings delta fail bugfix - settings always default on boot *Moved block to right scope *Got version number right duh --- tasmota/settings.ino | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tasmota/settings.ino b/tasmota/settings.ino index d9d913c0a..85a205da2 100644 --- a/tasmota/settings.ino +++ b/tasmota/settings.ino @@ -1416,6 +1416,13 @@ void SettingsDelta(void) if (Settings.rules[1][0] == 0) { Settings.rules[1][1] = 0; } if (Settings.rules[2][0] == 0) { Settings.rules[2][1] = 0; } } + + // ledpwm + if (Settings.version < 0x08030001) { + Settings.ledpwm_off = 0; + Settings.ledpwm_on = 1023; + Settings.ledpwm_mask = 0; + } if (Settings.version < 0x08030002) { SettingsUpdateText(SET_DEVICENAME, SettingsText(SET_FRIENDLYNAME1)); @@ -1424,10 +1431,5 @@ void SettingsDelta(void) Settings.version = VERSION; SettingsSave(1); } - // ledpwm - if (Settings.version < 0x080300002) { - Settings.ledpwm_off = 0; - Settings.ledpwm_on = 1023; - Settings.ledpwm_mask = 0; - } + }