From 05971a2ffe5db5b6e74c0a00921a5847b9342c50 Mon Sep 17 00:00:00 2001 From: Ewoud Date: Wed, 21 Dec 2022 13:39:42 +0100 Subject: [PATCH] fix Custom Effect button missing in action --- usermods/customeffects/usermod_v2_customeffects.h | 14 +++++++------- .../usermod_v2_four_line_display_ALT.h | 1 + 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/usermods/customeffects/usermod_v2_customeffects.h b/usermods/customeffects/usermod_v2_customeffects.h index 3161ce39..aa2d3c79 100644 --- a/usermods/customeffects/usermod_v2_customeffects.h +++ b/usermods/customeffects/usermod_v2_customeffects.h @@ -133,13 +133,13 @@ class CustomEffectsUserMod : public Usermod { */ void addToJsonState(JsonObject& root) { - // //root["user0"] = userVar0; - // if (!initDone) return; // prevent crash on boot applyPreset() - // JsonObject usermod = root[FPSTR(_name)]; - // if (usermod.isNull()) { - // usermod = root.createNestedObject(FPSTR(_name)); - // } - // usermod["on"] = enabled; + //root["user0"] = userVar0; + if (!initDone) return; // prevent crash on boot applyPreset() + JsonObject usermod = root[FPSTR(_name)]; + if (usermod.isNull()) { + usermod = root.createNestedObject(FPSTR(_name)); + } + usermod["on"] = enabled; } diff --git a/usermods/usermod_v2_four_line_display_ALT/usermod_v2_four_line_display_ALT.h b/usermods/usermod_v2_four_line_display_ALT/usermod_v2_four_line_display_ALT.h index abaecc62..b012d919 100644 --- a/usermods/usermod_v2_four_line_display_ALT/usermod_v2_four_line_display_ALT.h +++ b/usermods/usermod_v2_four_line_display_ALT/usermod_v2_four_line_display_ALT.h @@ -1037,6 +1037,7 @@ class FourLineDisplayUsermod : public Usermod { void appendConfigData() { oappend(SET_F("addInfo('4LineDisplay:help',0,'');")); // 0 is field type, 1 is actual field + oappend(SET_F("dd=addDropdown('4LineDisplay','type');")); oappend(SET_F("addOption(dd,'None',0);")); oappend(SET_F("addOption(dd,'SSD1306',1);"));