Skip to content

Commit 05971a2

Browse files
committed
fix Custom Effect button missing in action
1 parent fb5c057 commit 05971a2

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

usermods/customeffects/usermod_v2_customeffects.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -133,13 +133,13 @@ class CustomEffectsUserMod : public Usermod {
133133
*/
134134
void addToJsonState(JsonObject& root)
135135
{
136-
// //root["user0"] = userVar0;
137-
// if (!initDone) return; // prevent crash on boot applyPreset()
138-
// JsonObject usermod = root[FPSTR(_name)];
139-
// if (usermod.isNull()) {
140-
// usermod = root.createNestedObject(FPSTR(_name));
141-
// }
142-
// usermod["on"] = enabled;
136+
//root["user0"] = userVar0;
137+
if (!initDone) return; // prevent crash on boot applyPreset()
138+
JsonObject usermod = root[FPSTR(_name)];
139+
if (usermod.isNull()) {
140+
usermod = root.createNestedObject(FPSTR(_name));
141+
}
142+
usermod["on"] = enabled;
143143
}
144144

145145

usermods/usermod_v2_four_line_display_ALT/usermod_v2_four_line_display_ALT.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,6 +1037,7 @@ class FourLineDisplayUsermod : public Usermod {
10371037

10381038
void appendConfigData() {
10391039
oappend(SET_F("addInfo('4LineDisplay:help',0,'<button onclick=\"location.href=&quot;https://mm.kno.wled.ge/usermods/4LineDisplay&quot;\" type=\"button\">?</button>');")); // 0 is field type, 1 is actual field
1040+
10401041
oappend(SET_F("dd=addDropdown('4LineDisplay','type');"));
10411042
oappend(SET_F("addOption(dd,'None',0);"));
10421043
oappend(SET_F("addOption(dd,'SSD1306',1);"));

0 commit comments

Comments
 (0)