fix Custom Effect button missing in action

This commit is contained in:
Ewoud
2022-12-21 13:39:42 +01:00
parent fb5c057f94
commit 05971a2ffe
2 changed files with 8 additions and 7 deletions

View File

@@ -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;
}

View File

@@ -1037,6 +1037,7 @@ class FourLineDisplayUsermod : public Usermod {
void appendConfigData() {
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
oappend(SET_F("dd=addDropdown('4LineDisplay','type');"));
oappend(SET_F("addOption(dd,'None',0);"));
oappend(SET_F("addOption(dd,'SSD1306',1);"));