Small changes on pin dropdowns / usermod help
platformio.ini: add wemos_shield_esp32_4MB_all_base
usermods:
- rename disableROPins to disableRO
- bme280: add appendConfigData, info and disableRO
- PWM Fan: add appendConfigData
Settings_um.htm
- add 🟢
This commit is contained in:
@@ -400,6 +400,18 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
void appendConfigData() {
|
||||
oappend(SET_F("addHB('")); oappend(_name); oappend("');");
|
||||
|
||||
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("addInfo('BME280/BMP280:pin[]',1,'','I2C/SPI DTA');"));
|
||||
oappend(SET_F("rOption('BME280/BMP280:pin[]',1,'use global (")); oappendi(i2c_sda); oappend(")',-1);");
|
||||
}
|
||||
|
||||
|
||||
// Save Usermod Config Settings
|
||||
void addToConfig(JsonObject& root)
|
||||
{
|
||||
@@ -417,7 +429,6 @@ public:
|
||||
//WLEDMM: avoid global pin hijacking
|
||||
io_pin.add((ioPin[0]==i2c_scl)?-1:ioPin[0]);
|
||||
io_pin.add((ioPin[1]==i2c_sda)?-1:ioPin[1]);
|
||||
top[F("help4Pins")] = F("SCL,SDA"); // help for Settings page
|
||||
DEBUG_PRINTLN(F("BME280 config saved."));
|
||||
}
|
||||
|
||||
|
||||
@@ -286,6 +286,10 @@ class PWMFanUsermod : public Usermod {
|
||||
}
|
||||
}
|
||||
|
||||
void appendConfigData() {
|
||||
oappend(SET_F("addHB('")); oappend(_name); oappend("');");
|
||||
}
|
||||
|
||||
/*
|
||||
* addToConfig() can be used to add custom persistent settings to the cfg.json file in the "um" (usermod) object.
|
||||
* It will be called by WLED when settings are actually saved (for example, LED settings are saved)
|
||||
|
||||
@@ -2105,17 +2105,17 @@ class AudioReactive : public Usermod {
|
||||
oappend(SET_F("xOption('AudioReactive:digitalmic:pin[]',0,' ⎌',")); oappendi(I2S_SDPIN); oappend(");");
|
||||
#endif
|
||||
oappend(SET_F("addInfo('AudioReactive:digitalmic:pin[]',1,'<i>ws/clk/lrck</i>','I2S WS');"));
|
||||
oappend(SET_F("disableROPins('AudioReactive:digitalmic:pin[]',1);"));
|
||||
oappend(SET_F("disableRO('AudioReactive:digitalmic:pin[]',1);"));
|
||||
#ifdef I2S_WSPIN
|
||||
oappend(SET_F("xOption('AudioReactive:digitalmic:pin[]',1,' ⎌',")); oappendi(I2S_WSPIN); oappend(");");
|
||||
#endif
|
||||
oappend(SET_F("addInfo('AudioReactive:digitalmic:pin[]',2,'<i>sck/bclk</i>','I2S SCK');"));
|
||||
oappend(SET_F("disableROPins('AudioReactive:digitalmic:pin[]',2);"));
|
||||
oappend(SET_F("disableRO('AudioReactive:digitalmic:pin[]',2);"));
|
||||
#ifdef I2S_CKPIN
|
||||
oappend(SET_F("xOption('AudioReactive:digitalmic:pin[]',2,' ⎌',")); oappendi(I2S_CKPIN); oappend(");");
|
||||
#endif
|
||||
oappend(SET_F("addInfo('AudioReactive:digitalmic:pin[]',3,'<i>master clock</i>','I2S MCLK');"));
|
||||
oappend(SET_F("disableROPins('AudioReactive:digitalmic:pin[]',3);"));
|
||||
oappend(SET_F("disableRO('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
|
||||
@@ -2124,7 +2124,7 @@ class AudioReactive : public Usermod {
|
||||
oappend(SET_F("rOption('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("disableROPins('AudioReactive:digitalmic:pin[]',5);"));
|
||||
oappend(SET_F("disableRO('AudioReactive:digitalmic:pin[]',5);"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1058,7 +1058,7 @@ 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("disableROPins('4LineDisplay::pin[]',0);"));
|
||||
oappend(SET_F("disableRO('4LineDisplay:pin[]',0);"));
|
||||
#ifdef FLD_PIN_SCL
|
||||
oappend(SET_F("xOption('4LineDisplay:pin[]',0,' ⎌',")); oappendi(FLD_PIN_SCL); oappend(");");
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user