implement addHB (Usermod help button utility function)
See https://github.com/Aircoookie/WLED/pull/2965
This commit is contained in:
@@ -414,7 +414,7 @@ class Animated_Staircase : public Usermod {
|
||||
}
|
||||
|
||||
void appendConfigData() {
|
||||
oappend(SET_F("addInfo('staircase:help',0,'<button onclick=\"location.href="https://mm.kno.wled.ge/usermods/staircase"\" type=\"button\">?</button>');"));
|
||||
oappend(SET_F("addHB('")); oappend(SET_F(_name)); oappend("');");
|
||||
|
||||
//oappend(SET_F("dd=addDropdown('staircase','selectfield');"));
|
||||
//oappend(SET_F("addOption(dd,'1st value',0);"));
|
||||
|
||||
@@ -221,7 +221,8 @@ public:
|
||||
}
|
||||
|
||||
void appendConfigData() {
|
||||
oappend(SET_F("addInfo('BH1750:help',0,'<button onclick=\"location.href="https://mm.kno.wled.ge/usermods/BH1750"\" type=\"button\">?</button>');"));
|
||||
oappend(SET_F("addHB('")); oappend(SET_F(_name)); oappend("');");
|
||||
|
||||
oappend(SET_F("addInfo('BH1750:pin[]',1,'','I2C SDA');"));
|
||||
oappend(SET_F("rOption('BH1750:pin[]',1,'use global (")); oappendi(i2c_sda); oappend(")',-1);");
|
||||
oappend(SET_F("addInfo('BH1750:pin[]',0,'','I2C SCL');"));
|
||||
|
||||
@@ -378,7 +378,8 @@ class UsermodBattery : public Usermod
|
||||
|
||||
void appendConfigData()
|
||||
{
|
||||
oappend(SET_F("addInfo('Battery:help',0,'<button onclick=\"location.href="https://mm.kno.wled.ge/usermods/Battery"\" type=\"button\">?</button>');"));
|
||||
oappend(SET_F("addHB('")); oappend(SET_F(_name)); oappend("');");
|
||||
|
||||
oappend(SET_F("addInfo('Battery:min-voltage', 1, 'v');"));
|
||||
oappend(SET_F("addInfo('Battery:max-voltage', 1, 'v');"));
|
||||
oappend(SET_F("addInfo('Battery:capacity', 1, 'mAh');"));
|
||||
|
||||
@@ -414,7 +414,7 @@ public:
|
||||
|
||||
void appendConfigData()
|
||||
{
|
||||
oappend(SET_F("addInfo('PIRsensorSwitch:help',0,'<button onclick=\"location.href="https://mm.kno.wled.ge/usermods/PIRsensorSwitch"\" type=\"button\">?</button>');"));
|
||||
oappend(SET_F("addHB('")); oappend(SET_F(_name)); oappend("');");
|
||||
|
||||
oappend(SET_F("addInfo('PIRsensorSwitch:HA-discovery',1,'HA=Home Assistant');")); // 0 is field type, 1 is actual field
|
||||
oappend(SET_F("addInfo('PIRsensorSwitch:notifications',1,'Periodic WS updates');")); // 0 is field type, 1 is actual field
|
||||
|
||||
@@ -306,7 +306,7 @@ class UsermodTemperature : public Usermod {
|
||||
//}
|
||||
|
||||
void appendConfigData() {
|
||||
oappend(SET_F("addInfo('Temperature:help',0,'<button onclick=\"location.href="https://mm.kno.wled.ge/usermods/Temperature"\" type=\"button\">?</button>');"));
|
||||
oappend(SET_F("addHB('")); oappend(SET_F(_name)); oappend("');");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -303,7 +303,7 @@ class BobLightUsermod : public Usermod {
|
||||
}
|
||||
|
||||
void appendConfigData() {
|
||||
oappend(SET_F("addInfo('BobLight:help',0,'<button onclick=\"location.href="https://mm.kno.wled.ge/usermods/BobLight"\" type=\"button\">?</button>');"));
|
||||
oappend(SET_F("addHB('")); oappend(SET_F(_name)); oappend("');");
|
||||
|
||||
//oappend(SET_F("dd=addDropdown('usermod','selectfield');"));
|
||||
//oappend(SET_F("addOption(dd,'1st value',0);"));
|
||||
|
||||
@@ -205,7 +205,7 @@ class AutoSaveUsermod : public Usermod {
|
||||
}
|
||||
|
||||
void appendConfigData() {
|
||||
oappend(SET_F("addInfo('Autosave:help',0,'<button onclick=\"location.href="https://mm.kno.wled.ge/usermods/Autosave"\" type=\"button\">?</button>');"));
|
||||
oappend(SET_F("addHB('")); oappend(SET_F(_name)); oappend("');");
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -1036,7 +1036,7 @@ class FourLineDisplayUsermod : public Usermod {
|
||||
//}
|
||||
|
||||
void appendConfigData() {
|
||||
oappend(SET_F("addInfo('4LineDisplay:help',0,'<button onclick=\"location.href="https://mm.kno.wled.ge/usermods/4LineDisplay"\" type=\"button\">?</button>');"));
|
||||
oappend(SET_F("addHB('")); oappend(SET_F(_name)); oappend("');");
|
||||
|
||||
oappend(SET_F("dd=addDropdown('4LineDisplay','type');"));
|
||||
oappend(SET_F("addOption(dd,'None',0);"));
|
||||
|
||||
@@ -868,7 +868,8 @@ public:
|
||||
//WLEDMM: add appendConfigData
|
||||
void appendConfigData()
|
||||
{
|
||||
oappend(SET_F("addInfo('Rotary-Encoder:help',0,'<button onclick=\"location.href="https://mm.kno.wled.ge/usermods/Rotary-Encoder"\" type=\"button\">?</button>');"));
|
||||
oappend(SET_F("addHB('")); oappend(SET_F(_name)); oappend("');");
|
||||
|
||||
#ifdef ENCODER_DT_PIN
|
||||
oappend(SET_F("xOption('Rotary-Encoder:DT-pin',1,' ⎌',")); oappendi(ENCODER_DT_PIN); oappend(");");
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user