diff --git a/usermods/BH1750_v2/usermod_bh1750.h b/usermods/BH1750_v2/usermod_bh1750.h
index 1304747f..360c28db 100644
--- a/usermods/BH1750_v2/usermod_bh1750.h
+++ b/usermods/BH1750_v2/usermod_bh1750.h
@@ -235,9 +235,9 @@ public:
oappend(SET_F("addHB('BH1750');"));
// WLEDMM this usermod can ONLY use HW_I2C - so always use globals
//oappend(SET_F("addInfo('BH1750:pin[]',0,'','I2C SCL');"));
- //oappend(SET_F("rOption('BH1750:pin[]',0,'use global (")); oappendi(i2c_scl); oappend(")',-1);");
+ //oappend(SET_F("rOpt('BH1750:pin[]',0,'use global (")); oappendi(i2c_scl); oappend(")',-1);");
//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("rOpt('BH1750:pin[]',1,'use global (")); oappendi(i2c_sda); oappend(")',-1);");
}
// (called from set.cpp) stores persistent properties to cfg.json
diff --git a/usermods/BME280_v2/usermod_bme280.h b/usermods/BME280_v2/usermod_bme280.h
index f2b6022d..a36c162e 100644
--- a/usermods/BME280_v2/usermod_bme280.h
+++ b/usermods/BME280_v2/usermod_bme280.h
@@ -408,11 +408,11 @@ public:
oappend(SET_F("addHB('BME280/BMP280');"));
oappend(SET_F("addInfo('BME280/BMP280:pin[]',0,'','I2C/SPI CLK');"));
- oappend(SET_F("disableRO('BME280/BMP280:pin[]',0);"));
- oappend(SET_F("rOption('BME280/BMP280:pin[]',0,'use global (")); oappendi(i2c_scl); oappend(")',-1);");
+ oappend(SET_F("dRO('BME280/BMP280:pin[]',0);"));
+ oappend(SET_F("rOpt('BME280/BMP280:pin[]',0,'use global (")); oappendi(i2c_scl); oappend(")',-1);");
oappend(SET_F("addInfo('BME280/BMP280:pin[]',1,'','I2C/SPI DTA');"));
- oappend(SET_F("rOption('BME280/BMP280:pin[]',1,'use global (")); oappendi(i2c_sda); oappend(")',-1);");
+ oappend(SET_F("rOpt('BME280/BMP280:pin[]',1,'use global (")); oappendi(i2c_sda); oappend(")',-1);");
}
diff --git a/usermods/audioreactive/audio_reactive.h b/usermods/audioreactive/audio_reactive.h
index 182e8d7a..39bee83d 100644
--- a/usermods/audioreactive/audio_reactive.h
+++ b/usermods/audioreactive/audio_reactive.h
@@ -2032,8 +2032,9 @@ class AudioReactive : public Usermod {
//WLEDMM: add defaults
#ifdef AUDIOPIN
- oappend(SET_F("xOption('AudioReactive:analogmic:pin',1,' ⎌',")); oappendi(AUDIOPIN); oappend(");");
+ oappend(SET_F("xOpt('AudioReactive:analogmic:pin',1,' ⎌',")); oappendi(AUDIOPIN); oappend(");");
#endif
+ oappend(SET_F("aOpt('AudioReactive:analogmic:pin',1);")); //only analog options
oappend(SET_F("dd=addDropdown('AudioReactive','digitalmic:type');"));
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32S3)
@@ -2162,29 +2163,29 @@ class AudioReactive : public Usermod {
oappend(SET_F("addInfo('AudioReactive:digitalmic:type',1,'requires reboot!');")); // 0 is field type, 1 is actual field
oappend(SET_F("addInfo('AudioReactive:digitalmic:pin[]',0,'sd/data/dout','I2S SD');"));
#ifdef I2S_SDPIN
- oappend(SET_F("xOption('AudioReactive:digitalmic:pin[]',0,' ⎌',")); oappendi(I2S_SDPIN); oappend(");");
+ oappend(SET_F("xOpt('AudioReactive:digitalmic:pin[]',0,' ⎌',")); oappendi(I2S_SDPIN); oappend(");");
#endif
oappend(SET_F("addInfo('AudioReactive:digitalmic:pin[]',1,'ws/clk/lrck','I2S WS');"));
- oappend(SET_F("disableRO('AudioReactive:digitalmic:pin[]',1);"));
+ oappend(SET_F("dRO('AudioReactive:digitalmic:pin[]',1);"));
#ifdef I2S_WSPIN
- oappend(SET_F("xOption('AudioReactive:digitalmic:pin[]',1,' ⎌',")); oappendi(I2S_WSPIN); oappend(");");
+ oappend(SET_F("xOpt('AudioReactive:digitalmic:pin[]',1,' ⎌',")); oappendi(I2S_WSPIN); oappend(");");
#endif
oappend(SET_F("addInfo('AudioReactive:digitalmic:pin[]',2,'sck/bclk','I2S SCK');"));
- oappend(SET_F("disableRO('AudioReactive:digitalmic:pin[]',2);"));
+ oappend(SET_F("dRO('AudioReactive:digitalmic:pin[]',2);"));
#ifdef I2S_CKPIN
- oappend(SET_F("xOption('AudioReactive:digitalmic:pin[]',2,' ⎌',")); oappendi(I2S_CKPIN); oappend(");");
+ oappend(SET_F("xOpt('AudioReactive:digitalmic:pin[]',2,' ⎌',")); oappendi(I2S_CKPIN); oappend(");");
#endif
oappend(SET_F("addInfo('AudioReactive:digitalmic:pin[]',3,'master clock','I2S MCLK');"));
- oappend(SET_F("disableRO('AudioReactive:digitalmic:pin[]',3);"));
+ oappend(SET_F("dRO('AudioReactive:digitalmic:pin[]',3);"));
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32S3)
- oappend(SET_F("dOptions('AudioReactive:digitalmic:pin[]',3,2,2);")); //only use -1, 0, 1 or 3
- oappend(SET_F("dOptions('AudioReactive:digitalmic:pin[]',3,4,39);")); //only use -1, 0, 1 or 3
+ oappend(SET_F("dOpt('AudioReactive:digitalmic:pin[]',3,2,2);")); //only use -1, 0, 1 or 3
+ oappend(SET_F("dOpt('AudioReactive:digitalmic:pin[]',3,4,39);")); //only use -1, 0, 1 or 3
#endif
oappend(SET_F("addInfo('AudioReactive:digitalmic:pin[]',4,'','I2C SDA');"));
- oappend(SET_F("rOption('AudioReactive:digitalmic:pin[]',4,'use global (")); oappendi(i2c_sda); oappend(")',-1);");
+ oappend(SET_F("rOpt('AudioReactive:digitalmic:pin[]',4,'use global (")); oappendi(i2c_sda); oappend(")',-1);");
oappend(SET_F("addInfo('AudioReactive:digitalmic:pin[]',5,'','I2C SCL');"));
- oappend(SET_F("rOption('AudioReactive:digitalmic:pin[]',5,'use global (")); oappendi(i2c_scl); oappend(")',-1);");
- oappend(SET_F("disableRO('AudioReactive:digitalmic:pin[]',5);"));
+ oappend(SET_F("rOpt('AudioReactive:digitalmic:pin[]',5,'use global (")); oappendi(i2c_scl); oappend(")',-1);");
+ oappend(SET_F("dRO('AudioReactive:digitalmic:pin[]',5);"));
}
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 7f9ada8a..d8beeaf2 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
@@ -1064,23 +1064,23 @@ class FourLineDisplayUsermod : public Usermod {
bool isSPI = (type == SSD1306_SPI || type == SSD1306_SPI64);
// WLEDMM add defaults
oappend(SET_F("addInfo('4LineDisplay:pin[]',0,'','I2C/SPI CLK');"));
- oappend(SET_F("disableRO('4LineDisplay:pin[]',0);"));
+ oappend(SET_F("dRO('4LineDisplay:pin[]',0);"));
#ifdef FLD_PIN_SCL
- oappend(SET_F("xOption('4LineDisplay:pin[]',0,' ⎌',")); oappendi(FLD_PIN_SCL); oappend(");");
+ oappend(SET_F("xOpt('4LineDisplay:pin[]',0,' ⎌',")); oappendi(FLD_PIN_SCL); oappend(");");
#endif
if (isSPI) {
- oappend(SET_F("rOption('4LineDisplay:pin[]',0,'use global (")); oappendi(spi_sclk); oappend(")',-1);");
+ oappend(SET_F("rOpt('4LineDisplay:pin[]',0,'use global (")); oappendi(spi_sclk); oappend(")',-1);");
} else {
- oappend(SET_F("rOption('4LineDisplay:pin[]',0,'use global (")); oappendi(i2c_scl); oappend(")',-1);");
+ oappend(SET_F("rOpt('4LineDisplay:pin[]',0,'use global (")); oappendi(i2c_scl); oappend(")',-1);");
}
oappend(SET_F("addInfo('4LineDisplay:pin[]',1,'','I2C/SPI DTA');"));
#ifdef FLD_PIN_SDA
- oappend(SET_F("xOption('4LineDisplay:pin[]',1,' ⎌',")); oappendi(FLD_PIN_SDA); oappend(");");
+ oappend(SET_F("xOpt('4LineDisplay:pin[]',1,' ⎌',")); oappendi(FLD_PIN_SDA); oappend(");");
#endif
if (isSPI) {
- oappend(SET_F("rOption('4LineDisplay:pin[]',1,'use global (")); oappendi(spi_mosi); oappend(")',-1);");
+ oappend(SET_F("rOpt('4LineDisplay:pin[]',1,'use global (")); oappendi(spi_mosi); oappend(")',-1);");
} else {
- oappend(SET_F("rOption('4LineDisplay:pin[]',1,'use global (")); oappendi(i2c_sda); oappend(")',-1);");
+ oappend(SET_F("rOpt('4LineDisplay:pin[]',1,'use global (")); oappendi(i2c_sda); oappend(")',-1);");
}
oappend(SET_F("addInfo('4LineDisplay:pin[]',2,'','SPI CS');"));
oappend(SET_F("addInfo('4LineDisplay:pin[]',3,'','SPI DC');"));
diff --git a/usermods/usermod_v2_rotary_encoder_ui_ALT/usermod_v2_rotary_encoder_ui_ALT.h b/usermods/usermod_v2_rotary_encoder_ui_ALT/usermod_v2_rotary_encoder_ui_ALT.h
index 6db990c7..37b08d15 100644
--- a/usermods/usermod_v2_rotary_encoder_ui_ALT/usermod_v2_rotary_encoder_ui_ALT.h
+++ b/usermods/usermod_v2_rotary_encoder_ui_ALT/usermod_v2_rotary_encoder_ui_ALT.h
@@ -875,13 +875,13 @@ public:
oappend(SET_F("addHB('Rotary-Encoder');"));
#ifdef ENCODER_DT_PIN
- oappend(SET_F("xOption('Rotary-Encoder:DT-pin',1,' ⎌',")); oappendi(ENCODER_DT_PIN); oappend(");");
+ oappend(SET_F("xOpt('Rotary-Encoder:DT-pin',1,' ⎌',")); oappendi(ENCODER_DT_PIN); oappend(");");
#endif
#ifdef ENCODER_CLK_PIN
- oappend(SET_F("xOption('Rotary-Encoder:CLK-pin',1,' ⎌',")); oappendi(ENCODER_CLK_PIN); oappend(");");
+ oappend(SET_F("xOpt('Rotary-Encoder:CLK-pin',1,' ⎌',")); oappendi(ENCODER_CLK_PIN); oappend(");");
#endif
#ifdef ENCODER_SW_PIN
- oappend(SET_F("xOption('Rotary-Encoder:SW-pin',1,' ⎌',")); oappendi(ENCODER_SW_PIN); oappend(");");
+ oappend(SET_F("xOpt('Rotary-Encoder:SW-pin',1,' ⎌',")); oappendi(ENCODER_SW_PIN); oappend(");");
#endif
}
diff --git a/wled00/data/settings_um.htm b/wled00/data/settings_um.htm
index a5b28fa1..27811c9b 100644
--- a/wled00/data/settings_um.htm
+++ b/wled00/data/settings_um.htm
@@ -183,7 +183,7 @@
}
}
//WLEDMM: replace Option to set globals
- function rOption(name,el,txt,val) {
+ function rOpt(name,el,txt,val) {
let obj = d.getElementsByName(name);
var select = obj;
if (obj[el]) select = obj[el];
@@ -193,7 +193,7 @@
}
}
//WLEDMM: extend Option to set build flag defaults
- function xOption(name,el,txt,val) {
+ function xOpt(name,el,txt,val) {
let obj = d.getElementsByName(name);
var select = obj;
if (obj[el]) select = obj[el];
@@ -203,7 +203,7 @@
}
}
//WLEDMM: delete Options to remove options e.g. mclk
- function dOptions(name,el,valFrom,valTo) {
+ function dOpt(name,el,valFrom,valTo) {
let obj = d.getElementsByName(name);
var select = obj;
if (obj[el]) select = obj[el];
@@ -217,23 +217,40 @@
//https://www.javascripttutorial.net/javascript-dom/javascript-remove-items-from-a-select-conditionally/
}
}
-
- //WLEDMM
- function disableRO(name,el) {
+ //WLEDMM: analog options only
+ function aOpt(name,el) {
let obj = d.getElementsByName(name);
var select = obj;
if (obj[el]) select = obj[el];
- // console.log("disableRO", name, el, obj, "s", select, d.ro_gpio);
for (let i=0; i max_gpio
- function pinDropdownsPost() {
- // console.log('pinDropdownsPost', d.max_gpio, d.ro_gpio, d.rsvd);
+ function pinPost() {
+ // console.log('pinPost', d.max_gpio, d.ro_gpio, d.rsvd);
var elements = gId("form_s").elements;
for (var i = 0, select; select = elements[i++];) {
@@ -241,7 +258,7 @@
// console.log(element);
for (let i=0; i max_gpio
@@ -253,6 +270,7 @@
//https://www.javascripttutorial.net/javascript-dom/javascript-remove-items-from-a-select-conditionally/
if (c.text.length <= 4) c.text += " 🟢"; //2 digit number space and ⍼/⎌. If no reserved/read only/other um, then pin can be freely used (green)
for (let jj=0; jj