Add usermod help links for AR, 4LD and weather
Other usermods:
void appendConfigData()
{
...
oappend(SET_F("addInfo('<modname>:help',0,'<a href=\"https:// \">Help</a>');"));
...
}
This commit is contained in:
@@ -2047,6 +2047,7 @@ class AudioReactive : public Usermod {
|
||||
oappend(SET_F("addOption(dd,'Off',0);"));
|
||||
oappend(SET_F("addOption(dd,'Send',1);"));
|
||||
oappend(SET_F("addOption(dd,'Receive',2);"));
|
||||
oappend(SET_F("addInfo('AudioReactive:help',0,'<a href=\"https://moonmodules.github.io/WLED-Docs/soundreactive/Sound-Settings\">Help</a>');")); // 0 is field type, 1 is actual field
|
||||
oappend(SET_F("addInfo('AudioReactive:digitalmic:type',1,'<i>requires reboot!</i>');")); // 0 is field type, 1 is actual field
|
||||
#ifdef I2S_SDPIN
|
||||
oappend(SET_F("addInfo('AudioReactive:digitalmic:pin[]',0,'<i>sd/data/dout, ⎌ ")); oappendi(I2S_SDPIN); oappend("</i>','I2S SD');");
|
||||
|
||||
@@ -124,12 +124,6 @@ class CustomEffectsUserMod : public Usermod {
|
||||
*/
|
||||
void addToJsonInfo(JsonObject& root)
|
||||
{
|
||||
JsonObject user = root["u"];
|
||||
if (user.isNull()) user = root.createNestedObject("u");
|
||||
|
||||
JsonArray infoArr = user.createNestedArray(FPSTR(_name));
|
||||
infoArr.add(errorMessage); //value
|
||||
// infoArr.add(""); //unit
|
||||
}
|
||||
|
||||
|
||||
@@ -139,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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1036,6 +1036,7 @@ class FourLineDisplayUsermod : public Usermod {
|
||||
//}
|
||||
|
||||
void appendConfigData() {
|
||||
oappend(SET_F("addInfo('4LineDisplay:help',0,'<a href=\"https://moonmodules.github.io/WLED-Docs/usermods/four-line-display\">Help</a>');")); // 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);"));
|
||||
|
||||
@@ -317,6 +317,7 @@ class WeatherUsermod : public Usermod {
|
||||
|
||||
void appendConfigData()
|
||||
{
|
||||
oappend(SET_F("addInfo('WeatherUserMod:help',0,'<a href=\"https://moonmodules.github.io/WLED-Docs/moonmodules/weather-usermod\">Help</a>');")); // 0 is field type, 1 is actual field
|
||||
oappend(SET_F("dd=addDropdown('WeatherUserMod','units');"));
|
||||
oappend(SET_F("addOption(dd,'Kelvin',0);"));
|
||||
oappend(SET_F("addOption(dd,'Celcius',1);"));
|
||||
|
||||
Reference in New Issue
Block a user