Revert "WLED 0.15.0-b4 release"
Messed FX_fcn.cpp CRLF conversion
This commit is contained in:
		
							
								
								
									
										38
									
								
								CHANGELOG.md
									
									
									
									
									
								
							
							
						
						
									
										38
									
								
								CHANGELOG.md
									
									
									
									
									
								
							| @@ -1,43 +1,5 @@ | ||||
| ## WLED changelog | ||||
|  | ||||
| #### Build 2406290 | ||||
| -   WLED 0.15.0-b4 release | ||||
| -   Add LD2410 sensor usermod (#4013 by @wesleygas) | ||||
| -   LED settings bus management update (WARNING only allow available outputs) | ||||
| -   Add ETH support for LILYGO-POE-Pro (#4030 by @rorosaurus) | ||||
| -   Update usermod_sn_photoresistor (#4017 by @xkvmoto) | ||||
| -   Several internal fixes and optimisations | ||||
|     - move LED_BUILTIN handling to BusManager class | ||||
|     - reduce max panels (web server limitation) | ||||
|     - edit WiFi TX power (ESP32) | ||||
|     - keep current ledmap ID in UI | ||||
|     - limit outputs in UI based on length | ||||
|     - wifi.ap addition to JSON Info (JSON API) | ||||
|     - relay pin init bugfix | ||||
|     - file editor button in UI | ||||
|     - ESP8266: update was restarting device on some occasions | ||||
|     - a bit of throttling in UI (for ESP8266) | ||||
|  | ||||
| #### Build 2406120 | ||||
| -   Update NeoPixelBus to v2.8.0 | ||||
| -   Increased LED outputs one ESP32 using parallel I2S (up to 17) | ||||
|     - use single/mono I2S + 4x RMT for 5 outputs or less | ||||
|     - use parallel x8 I2S + 8x RMT for >5 outputs (limit of 300 LEDs per output) | ||||
| -   Fixed code of Smartnest and updated documentation (#4001 by @DevilPro1) | ||||
| -   ESP32-S3 WiFi fix (#4010 by @cstruck) | ||||
| -   TetrisAI usermod fix (#3897 by @muebau) | ||||
| -   ESP-NOW usermod hook | ||||
| -   Update wled.h regarding OTA Password (#3993 by @gsieben) | ||||
| -   Usermod BME68X Sensor Implementation (#3994 by @gsieben) | ||||
| -   Add a usermod for AHT10, AHT15 and AHT20 temperature/humidity sensors (#3977 by @LordMike) | ||||
| -   Update Battery usermod documentation (#3968 by @adamsthws) | ||||
| -   Add INA226 usermod for reading current and power over i2c (#3986 by @LordMike) | ||||
| -   Bugfixes: #3991 | ||||
| -   Several internal fixes and optimisations (WARNING: some effects may be broken that rely on overflow/narrow width) | ||||
|     - replace uint8_t and uint16_t with unsigned | ||||
|     - replace in8_t and int16_t with int | ||||
|     - reduces code by 1kB | ||||
|  | ||||
| #### Build 2405180 | ||||
| -   Official 0.15.0-b3 release | ||||
| -   Merge 0.14.3 fixes | ||||
|   | ||||
							
								
								
									
										4
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										4
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							| @@ -1,12 +1,12 @@ | ||||
| { | ||||
|   "name": "wled", | ||||
|   "version": "0.15.0-b4", | ||||
|   "version": "0.15.0-b3", | ||||
|   "lockfileVersion": 3, | ||||
|   "requires": true, | ||||
|   "packages": { | ||||
|     "": { | ||||
|       "name": "wled", | ||||
|       "version": "0.15.0-b4", | ||||
|       "version": "0.15.0-b3", | ||||
|       "license": "ISC", | ||||
|       "dependencies": { | ||||
|         "clean-css": "^5.3.3", | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| { | ||||
|   "name": "wled", | ||||
|   "version": "0.15.0-b4", | ||||
|   "version": "0.15.0-b3", | ||||
|   "description": "Tools for WLED project", | ||||
|   "main": "tools/cdata.js", | ||||
|   "directories": { | ||||
|   | ||||
| @@ -10,7 +10,7 @@ default_envs = WLED_tasmota_1M  # define as many as you need | ||||
| #---------- | ||||
| # SAMPLE | ||||
| #---------- | ||||
| [env:WLED_generic8266_1M] | ||||
| [env:WLED_tasmota_1M] | ||||
| extends = env:esp01_1m_full  # when you want to extend the existing environment (define only updated options) | ||||
| ; board = esp01_1m  # uncomment when ou need different board | ||||
| ; platform = ${common.platform_wled_default}  # uncomment and change when you want particular platform | ||||
| @@ -26,9 +26,9 @@ lib_deps = ${esp8266.lib_deps} | ||||
| ;  adafruit/Adafruit BME280 Library@^2.2.2 | ||||
| ;  Wire | ||||
| ;  robtillaart/SHT85@~0.3.3 | ||||
| ;  ;gmag11/QuickESPNow @ ~0.7.0 # will also load QuickDebug | ||||
| ;  gmag11/QuickESPNow ;@ 0.6.2 | ||||
| ;  https://github.com/blazoncek/QuickESPNow.git#optional-debug  ;; exludes debug library | ||||
| ;  ${esp32.AR_lib_deps} ;; used for USERMOD_AUDIOREACTIVE | ||||
| ;  https://github.com/kosme/arduinoFFT#develop @ 2.0.1 ;; used for USERMOD_AUDIOREACTIVE | ||||
| build_unflags = ${common.build_unflags} | ||||
| build_flags = ${common.build_flags} ${esp8266.build_flags} | ||||
| ; | ||||
| @@ -51,11 +51,6 @@ build_flags = ${common.build_flags} ${esp8266.build_flags} | ||||
| ;   -D WLED_DISABLE_ESPNOW | ||||
| ;   -D WLED_DISABLE_BROWNOUT_DET | ||||
| ; | ||||
| ; enable optional built-in features | ||||
| ;   -D WLED_ENABLE_PIXART | ||||
| ;   -D WLED_ENABLE_USERMOD_PAGE # if created | ||||
| ;   -D WLED_ENABLE_DMX | ||||
| ; | ||||
| ; PIN defines - uncomment and change, if needed: | ||||
| ;   -D LEDPIN=2 | ||||
| ; or use this for multiple outputs | ||||
| @@ -69,8 +64,6 @@ build_flags = ${common.build_flags} ${esp8266.build_flags} | ||||
| ; | ||||
| ; Limit max buses | ||||
| ;   -D WLED_MAX_BUSSES=2 | ||||
| ;   -D WLED_MAX_ANALOG_CHANNELS=3   # only 3 PWM HW pins available | ||||
| ;   -D WLED_MAX_DIGITAL_CHANNELS=2  # only 2 HW accelerated pins available | ||||
| ; | ||||
| ; Configure default WiFi | ||||
| ;   -D CLIENT_SSID='"MyNetwork"' | ||||
| @@ -135,12 +128,12 @@ build_flags = ${common.build_flags} ${esp8266.build_flags} | ||||
| ; | ||||
| ; Use PIR sensor usermod and configure it to use GPIO4 and timer of 60s | ||||
| ;   -D USERMOD_PIRSWITCH | ||||
| ;   -D PIR_SENSOR_PIN=4   # use -1 to disable usermod | ||||
| ;   -D PIR_SENSOR_PIN=4 | ||||
| ;   -D PIR_SENSOR_OFF_SEC=60 | ||||
| ;   -D PIR_SENSOR_MAX_SENSORS=2 # max allowable sensors (uses OR logic for triggering) | ||||
| ; | ||||
| ; Use Audioreactive usermod and configure I2S microphone | ||||
| ;   -D USERMOD_AUDIOREACTIVE | ||||
| ;   -D UM_AUDIOREACTIVE_USE_NEW_FFT | ||||
| ;   -D AUDIOPIN=-1 | ||||
| ;   -D DMTYPE=1     # 0-analog/disabled, 1-I2S generic, 2-ES7243, 3-SPH0645, 4-I2S+mclk, 5-I2S PDM | ||||
| ;   -D I2S_SDPIN=36 | ||||
| @@ -163,21 +156,17 @@ build_flags = ${common.build_flags} ${esp8266.build_flags} | ||||
| ; or this for multiple outputs | ||||
| ;   -D PIXEL_COUNTS=30,30 | ||||
| ;    | ||||
| ; set the default LED type | ||||
| ;   -D DEFAULT_LED_TYPE=22    # see const.h (TYPE_xxxx) | ||||
| ; | ||||
| ; set milliampere limit when using ESP power pin (or inadequate PSU) to power LEDs | ||||
| ; set milliampere limit when using ESP pin to power leds | ||||
| ;   -D ABL_MILLIAMPS_DEFAULT=850 | ||||
| ;   -D LED_MILLIAMPS_DEFAULT=55 | ||||
| ; | ||||
| ; enable IR by setting remote type | ||||
| ;   -D IRTYPE=0   # 0 Remote disabled | 1 24-key RGB | 2 24-key with CT | 3 40-key blue | 4 40-key RGB | 5 21-key RGB | 6 6-key black | 7 9-key red | 8 JSON remote | ||||
| ;   -D IRTYPE=0 ;0 Remote disabled | 1 24-key RGB | 2 24-key with CT | 3 40-key blue | 4 40-key RGB | 5 21-key RGB | 6 6-key black | 7 9-key red | 8 JSON remote | ||||
| ;    | ||||
| ; set default color order of your led strip | ||||
| ;   -D DEFAULT_LED_COLOR_ORDER=COL_ORDER_GRB | ||||
| ; | ||||
| ; use PSRAM on classic ESP32 rev.1 (rev.3 or above has no issues) | ||||
| ;   -DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue   # needed only for classic ESP32 rev.1 | ||||
| ;   -DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue | ||||
| ; | ||||
| ; configure I2C and SPI interface (for various hardware) | ||||
| ;   -D I2CSDAPIN=33 # initialise interface | ||||
|   | ||||
| @@ -58,11 +58,7 @@ private: | ||||
|   bool sensorPinState[PIR_SENSOR_MAX_SENSORS] = {LOW}; // current PIR sensor pin state | ||||
|  | ||||
|   // configurable parameters | ||||
| #if PIR_SENSOR_PIN < 0 | ||||
|   bool enabled              = false;          // PIR sensor disabled | ||||
| #else | ||||
|   bool enabled              = true;           // PIR sensor enabled | ||||
| #endif | ||||
|   int8_t PIRsensorPin[PIR_SENSOR_MAX_SENSORS] = {PIR_SENSOR_PIN}; // PIR sensor pin | ||||
|   uint32_t m_switchOffDelay = PIR_SENSOR_OFF_SEC*1000;  // delay before switch off after the sensor state goes LOW (10min) | ||||
|   uint8_t m_onPreset        = 0;              // on preset | ||||
|   | ||||
| @@ -122,9 +122,9 @@ class AutoSaveUsermod : public Usermod { | ||||
|      * Da loop. | ||||
|      */ | ||||
|     void loop() { | ||||
|       static unsigned long lastRun = 0; | ||||
|       if (!autoSaveAfterSec || !enabled || strip.isUpdating() || currentPreset>0) return;  // setting 0 as autosave seconds disables autosave | ||||
|  | ||||
|       unsigned long now = millis(); | ||||
|       if (!autoSaveAfterSec || !enabled || currentPreset>0 || (strip.isUpdating() && now - lastRun < 240)) return;  // setting 0 as autosave seconds disables autosave | ||||
|       uint8_t currentMode = strip.getMainSegment().mode; | ||||
|       uint8_t currentPalette = strip.getMainSegment().palette; | ||||
|  | ||||
|   | ||||
| @@ -1231,7 +1231,7 @@ void WS2812FX::finalizeInit(void) { | ||||
|       unsigned start = prevLen; | ||||
|       unsigned count = defCounts[(i < defNumCounts) ? i : defNumCounts -1]; | ||||
|       prevLen += count; | ||||
|       BusConfig defCfg = BusConfig(DEFAULT_LED_TYPE, defPin, start, count, DEFAULT_LED_COLOR_ORDER, false, 0, RGBW_MODE_MANUAL_ONLY, 0, useGlobalLedBuffer); | ||||
|       BusConfig defCfg = BusConfig(DEFAULT_LED_TYPE, defPin, start, count, DEFAULT_LED_COLOR_ORDER, false, 0, RGBW_MODE_MANUAL_ONLY); | ||||
|       if (BusManager::add(defCfg) == -1) break; | ||||
|     } | ||||
|   } | ||||
|   | ||||
| @@ -37,7 +37,7 @@ struct BusConfig { | ||||
|   uint8_t milliAmpsPerLed; | ||||
|   uint16_t milliAmpsMax; | ||||
|  | ||||
|   BusConfig(uint8_t busType, uint8_t* ppins, uint16_t pstart, uint16_t len = 1, uint8_t pcolorOrder = COL_ORDER_GRB, bool rev = false, uint8_t skip = 0, byte aw=RGBW_MODE_MANUAL_ONLY, uint16_t clock_kHz=0U, bool dblBfr=false, uint8_t maPerLed=LED_MILLIAMPS_DEFAULT, uint16_t maMax=ABL_MILLIAMPS_DEFAULT) | ||||
|   BusConfig(uint8_t busType, uint8_t* ppins, uint16_t pstart, uint16_t len = 1, uint8_t pcolorOrder = COL_ORDER_GRB, bool rev = false, uint8_t skip = 0, byte aw=RGBW_MODE_MANUAL_ONLY, uint16_t clock_kHz=0U, bool dblBfr=false, uint8_t maPerLed=55, uint16_t maMax=ABL_MILLIAMPS_DEFAULT) | ||||
|   : count(len) | ||||
|   , start(pstart) | ||||
|   , colorOrder(pcolorOrder) | ||||
| @@ -129,7 +129,7 @@ class Bus { | ||||
|     virtual uint32_t getPixelColor(uint16_t pix) { return 0; } | ||||
|     virtual void     setBrightness(uint8_t b)    { _bri = b; }; | ||||
|     virtual uint8_t  getPins(uint8_t* pinArray)  { return 0; } | ||||
|     virtual uint16_t getLength()                 { return isOk() ? _len : 0; } | ||||
|     virtual uint16_t getLength()                 { return _len; } | ||||
|     virtual void     setColorOrder(uint8_t co)   {} | ||||
|     virtual uint8_t  getColorOrder()             { return COL_ORDER_RGB; } | ||||
|     virtual uint8_t  skippedLeds()               { return 0; } | ||||
|   | ||||
| @@ -46,58 +46,36 @@ | ||||
|  | ||||
| #ifndef WLED_MAX_BUSSES | ||||
|   #ifdef ESP8266 | ||||
|     #define WLED_MAX_DIGITAL_CHANNELS 3 | ||||
|     #define WLED_MAX_ANALOG_CHANNELS 5 | ||||
|     #define WLED_MAX_BUSSES 4                 // will allow 3 digital & 1 analog RGB | ||||
|     #define WLED_MAX_BUSSES 3 | ||||
|     #define WLED_MIN_VIRTUAL_BUSSES 2 | ||||
|   #else | ||||
|     #if defined(CONFIG_IDF_TARGET_ESP32C3)    // 2 RMT, 6 LEDC, only has 1 I2S but NPB does not support it ATM | ||||
|       #define WLED_MAX_BUSSES 4               // will allow 2 digital & 2 analog RGB | ||||
|       #define WLED_MAX_DIGITAL_CHANNELS 2 | ||||
|       #define WLED_MAX_ANALOG_CHANNELS 6 | ||||
|       #define WLED_MAX_BUSSES 3               // will allow 2 digital & 1 analog (or the other way around) | ||||
|       #define WLED_MIN_VIRTUAL_BUSSES 3 | ||||
|     #elif defined(CONFIG_IDF_TARGET_ESP32S2)  // 4 RMT, 8 LEDC, only has 1 I2S bus, supported in NPB | ||||
|       // the 5th bus (I2S) will prevent Audioreactive usermod from functioning (it is last used though) | ||||
|       #define WLED_MAX_BUSSES 7               // will allow 5 digital & 2 analog RGB | ||||
|       #define WLED_MAX_DIGITAL_CHANNELS 5 | ||||
|       #define WLED_MAX_ANALOG_CHANNELS 8 | ||||
|       #define WLED_MAX_BUSSES 7               // will allow 5 digital & 2 analog | ||||
|       #define WLED_MIN_VIRTUAL_BUSSES 3 | ||||
|     #elif defined(CONFIG_IDF_TARGET_ESP32S3)  // 4 RMT, 8 LEDC, has 2 I2S but NPB does not support them ATM | ||||
|       #define WLED_MAX_BUSSES 6               // will allow 4 digital & 2 analog RGB | ||||
|       #define WLED_MAX_DIGITAL_CHANNELS 4 | ||||
|       #define WLED_MAX_ANALOG_CHANNELS 8 | ||||
|       #define WLED_MAX_BUSSES 6               // will allow 4 digital & 2 analog | ||||
|       #define WLED_MIN_VIRTUAL_BUSSES 4 | ||||
|     #else | ||||
|       // the last digital bus (I2S0) will prevent Audioreactive usermod from functioning | ||||
|       #define WLED_MAX_BUSSES 20              // will allow 17 digital & 3 analog RGB | ||||
|       #define WLED_MAX_DIGITAL_CHANNELS 17 | ||||
|       #define WLED_MAX_ANALOG_CHANNELS 10 | ||||
|       #define WLED_MIN_VIRTUAL_BUSSES 4 | ||||
|       #define WLED_MAX_BUSSES 17 | ||||
|       #define WLED_MIN_VIRTUAL_BUSSES 0 | ||||
|     #endif | ||||
|   #endif | ||||
| #else | ||||
|   #ifdef ESP8266 | ||||
|     #if WLED_MAX_BUSSES > 5 | ||||
|     #if WLED_MAX_BUSES > 5 | ||||
|       #error Maximum number of buses is 5. | ||||
|     #endif | ||||
|     #ifndef WLED_MAX_ANALOG_CHANNELS | ||||
|       #error You must also define WLED_MAX_ANALOG_CHANNELS. | ||||
|     #endif | ||||
|     #ifndef WLED_MAX_DIGITAL_CHANNELS | ||||
|       #error You must also define WLED_MAX_DIGITAL_CHANNELS. | ||||
|     #endif | ||||
|     #define WLED_MIN_VIRTUAL_BUSSES (5-WLED_MAX_BUSSES) | ||||
|   #else | ||||
|     #if WLED_MAX_BUSSES > 20 | ||||
|       #error Maximum number of buses is 20. | ||||
|     #if WLED_MAX_BUSES > 17 | ||||
|       #error Maximum number of buses is 17. | ||||
|     #endif | ||||
|     #ifndef WLED_MAX_ANALOG_CHANNELS | ||||
|       #error You must also define WLED_MAX_ANALOG_CHANNELS. | ||||
|     #endif | ||||
|     #ifndef WLED_MAX_DIGITAL_CHANNELS | ||||
|       #error You must also define WLED_MAX_DIGITAL_CHANNELS. | ||||
|     #endif | ||||
|     #define WLED_MIN_VIRTUAL_BUSSES (20-WLED_MAX_BUSSES) | ||||
|     #define WLED_MIN_VIRTUAL_BUSSES (17-WLED_MAX_BUSSES) | ||||
|   #endif | ||||
| #endif | ||||
|  | ||||
| @@ -502,16 +480,6 @@ | ||||
|   #endif | ||||
| #endif | ||||
|  | ||||
| #ifndef LED_MILLIAMPS_DEFAULT | ||||
|   #define LED_MILLIAMPS_DEFAULT 55    // common WS2812B | ||||
| #else | ||||
|   #if LED_MILLIAMPS_DEFAULT < 1 || LED_MILLIAMPS_DEFAULT > 100 | ||||
|    #warning "Unusual LED mA current, overriding with default value." | ||||
|    #undef LED_MILLIAMPS_DEFAULT | ||||
|    #define LED_MILLIAMPS_DEFAULT 55 | ||||
|   #endif | ||||
| #endif | ||||
|  | ||||
| // PWM settings | ||||
| #ifndef WLED_PWM_FREQ | ||||
| #ifdef ESP8266 | ||||
|   | ||||
| @@ -2794,9 +2794,8 @@ function getPalettesData(page, callback) | ||||
| 		return res.json(); | ||||
| 	}) | ||||
| 	.then(json => { | ||||
| 		retry = false; | ||||
| 		palettesData = Object.assign({}, palettesData, json.p); | ||||
| 		if (page < json.m) setTimeout(()=>{ getPalettesData(page + 1, callback); }, 75); | ||||
| 		if (page < json.m) setTimeout(()=>{ getPalettesData(page + 1, callback); }, 50); | ||||
| 		else callback(); | ||||
| 	}) | ||||
| 	.catch((error)=>{ | ||||
| @@ -2836,8 +2835,7 @@ function search(field, listId = null) { | ||||
| 	if (gId("filters").querySelectorAll("input[type=checkbox]:checked").length) return; | ||||
|  | ||||
| 	// filter list items but leave (Default & Solid) always visible | ||||
| 	const listItems = gId("fxlist").querySelectorAll('.lstI'); | ||||
| 	listItems.forEach((listItem,i)=>{ | ||||
| 	gId(listId).querySelectorAll('.lstI').forEach((listItem,i)=>{ | ||||
| 		if (listId!=='pcont' && i===0) return; | ||||
| 		const listItemName = listItem.querySelector('.lstIname').innerText.toUpperCase(); | ||||
| 		const searchIndex = listItemName.indexOf(field.value.toUpperCase()); | ||||
| @@ -3060,7 +3058,7 @@ function size() | ||||
|  | ||||
| function togglePcMode(fromB = false) | ||||
| { | ||||
| 	let ap = (fromB && !lastinfo) || (lastinfo && lastinfo.wifi && lastinfo.wifi.ap); | ||||
| 	let ap = (fromB && !lastinfo) || (lastinfo && lastinfo.wifi && lastinfo.witi.ap); | ||||
| 	if (fromB) { | ||||
| 		pcModeA = !pcModeA; | ||||
| 		localStorage.setItem('pcm', pcModeA); | ||||
|   | ||||
| @@ -5,7 +5,7 @@ | ||||
| 	<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport"> | ||||
| 	<title>LED Settings</title> | ||||
| 	<script> | ||||
| 		var d=document,laprev=55,maxB=1,maxD=1,maxA=1,maxV=0,maxM=4000,maxPB=4096,maxL=1333,maxCO=10,maxLbquot=0; //maximum bytes for LED allocation: 4kB for 8266, 32kB for 32 | ||||
| 		var d=document,laprev=55,maxB=1,maxV=0,maxM=4000,maxPB=4096,maxL=1333,maxCO=10,maxLbquot=0; //maximum bytes for LED allocation: 4kB for 8266, 32kB for 32 | ||||
| 		var oMaxB=1; | ||||
| 		d.um_p = []; | ||||
| 		d.rsvd = []; | ||||
| @@ -58,16 +58,14 @@ | ||||
| 			x.style.animation = 'none'; | ||||
| 			timeout = setTimeout(function(){ x.className = x.className.replace("show", ""); }, 2900); | ||||
| 		} | ||||
| 		function bLimits(b,v,p,m,l,o=5,d=2,a=6) { | ||||
| 		function bLimits(b,v,p,m,l,o) { | ||||
| 			// maxB - max buses (can be changed if using ESP32 parallel I2S) | ||||
| 			// maxD - max digital channels (can be changed if using ESP32 parallel I2S) | ||||
| 			// maxA - max analog channels | ||||
| 			// maxV - min virtual buses | ||||
| 			// maxPB - max LEDs per bus | ||||
| 			// maxM - max LED memory | ||||
| 			// maxL - max LEDs | ||||
| 			// maxCO - max Color Order mappings | ||||
| 			oMaxB = maxB = b; maxD = d, maxA = a, maxV = v; maxM = m; maxPB = p; maxL = l; maxCO = o; | ||||
| 			oMaxB = maxB = b; maxV = v; maxM = m; maxPB = p; maxL = l; maxCO = o; | ||||
| 		} | ||||
| 		function pinsOK() { | ||||
| 			var ok = true; | ||||
| @@ -126,10 +124,7 @@ | ||||
| 			if (!pinsOK()) {e.stopPropagation();return false;} // Prevent form submission and contact with server | ||||
| 			if (bquot > 100) {var msg = "Too many LEDs for me to handle!"; if (maxM < 10000) msg += "\n\rConsider using an ESP32."; alert(msg);} | ||||
| 			if (!d.Sf.ABL.checked || d.Sf.PPL.checked) d.Sf.MA.value = 0; // submit 0 as ABL (PPL will handle it) | ||||
| 			if (d.Sf.checkValidity()) { | ||||
| 				d.Sf.querySelectorAll("#mLC select[name^=LT]").forEach((s)=>{s.disabled=false;}); // just in case | ||||
| 				d.Sf.submit(); //https://stackoverflow.com/q/37323914 | ||||
| 			} | ||||
| 			if (d.Sf.checkValidity()) d.Sf.submit(); //https://stackoverflow.com/q/37323914 | ||||
| 		} | ||||
| 		function enABL() | ||||
| 		{ | ||||
| @@ -226,9 +221,7 @@ | ||||
| 			maxB = oMaxB; // TODO make sure we start with all possible buses | ||||
|  | ||||
| 			// enable/disable LED fields | ||||
| 			let LTs = d.Sf.querySelectorAll("#mLC select[name^=LT]"); | ||||
| 			LTs.forEach((s,i)=>{ | ||||
| 				if (i < LTs.length-1) s.disabled = true; // prevent changing type (as we can't update options) | ||||
| 			d.Sf.querySelectorAll("#mLC select[name^=LT]").forEach((s)=>{ | ||||
| 				// is the field a LED type? | ||||
| 				var n = s.name.substring(2); | ||||
| 				var t = parseInt(s.value); | ||||
| @@ -381,62 +374,53 @@ | ||||
| 			v = parseInt(d.getElementsByName("LS"+s)[0].value) + parseInt(d.getElementsByName("LC"+s)[0].value); | ||||
| 			var t = parseInt(d.getElementsByName("LT"+s)[0].value); | ||||
| 			if (isPWM(t)) v = 1; //PWM busses | ||||
| 			return isNaN(v) ? 0 : v; | ||||
| 			if (isNaN(v)) return 0; | ||||
| 			return v; | ||||
| 		} | ||||
| 		function addLEDs(n,init=true) | ||||
| 		{ | ||||
| 			var o = d.getElementsByClassName("iST"); | ||||
| 			var i = o.length; | ||||
| 			let disable = (sel,opt) => { sel.querySelectorAll(opt).forEach((o)=>{o.disabled=true;}); } | ||||
|  | ||||
| 			var f = gId("mLC"); | ||||
| 			let digitalB = 0, analogB = 0, twopinB = 0, virtB = 0; | ||||
| 			f.querySelectorAll("select[name^=LT]").forEach((s)=>{ | ||||
| 				let t = s.value; | ||||
| 				if (isDig(t) && !isD2P(t)) digitalB++; | ||||
| 				if (isD2P(t)) twopinB++; | ||||
| 				if (isPWM(t)) analogB += t-40; // type defines PWM pins | ||||
| 				if (isVir(t)) virtB++; | ||||
| 			}); | ||||
|  | ||||
| 			if ((n==1 && i>=maxB+maxV) || (n==-1 && i==0)) return; | ||||
| 			var s = String.fromCharCode((i<10?48:55)+i); | ||||
|  | ||||
| 			var f = gId("mLC"); | ||||
| 			if (n==1) { | ||||
| // npm run build has trouble minimizing spaces inside string | ||||
| 				var cn = `<div class="iST"> | ||||
| <hr class="sml"> | ||||
| ${i+1}: | ||||
| <select name="LT${s}" onchange="UI(true)">${i>=maxB && false ? '' : | ||||
| '<option value="22" data-type="D">WS281x</option>\ | ||||
| <option value="30" data-type="D">SK6812/WS2814 RGBW</option>\ | ||||
| <option value="31" data-type="D">TM1814</option>\ | ||||
| <option value="24" data-type="D">400kHz</option>\ | ||||
| <option value="25" data-type="D">TM1829</option>\ | ||||
| <option value="26" data-type="D">UCS8903</option>\ | ||||
| <option value="27" data-type="D">APA106/PL9823</option>\ | ||||
| <option value="33" data-type="D">TM1914</option>\ | ||||
| <option value="28" data-type="D">FW1906 GRBCW</option>\ | ||||
| <option value="29" data-type="D">UCS8904 RGBW</option>\ | ||||
| <option value="32" data-type="D">WS2805 RGBCW</option>\ | ||||
| <option value="50" data-type="2P">WS2801</option>\ | ||||
| <option value="51" data-type="2P">APA102</option>\ | ||||
| <option value="52" data-type="2P">LPD8806</option>\ | ||||
| <option value="54" data-type="2P">LPD6803</option>\ | ||||
| <option value="53" data-type="2P">P9813</option>\ | ||||
| <option value="19" data-type="D">WS2811 White</option>\ | ||||
| <select name="LT${s}" onchange="UI(true)">${i>=maxB ? '' : | ||||
| '<option value="22" selected>WS281x</option>\ | ||||
| <option value="30">SK6812/WS2814 RGBW</option>\ | ||||
| <option value="31">TM1814</option>\ | ||||
| <option value="24">400kHz</option>\ | ||||
| <option value="25">TM1829</option>\ | ||||
| <option value="26">UCS8903</option>\ | ||||
| <option value="27">APA106/PL9823</option>\ | ||||
| <option value="33">TM1914</option>\ | ||||
| <option value="28">FW1906 GRBCW</option>\ | ||||
| <option value="29">UCS8904 RGBW</option>\ | ||||
| <option value="32">WS2805 RGBCW</option>\ | ||||
| <option value="50">WS2801</option>\ | ||||
| <option value="51">APA102</option>\ | ||||
| <option value="52">LPD8806</option>\ | ||||
| <option value="54">LPD6803</option>\ | ||||
| <option value="53">P9813</option>\ | ||||
| <option value="19">WS2811 White</option>\ | ||||
| <option value="40">On/Off</option>\ | ||||
| <option value="41" data-type="A">PWM White</option>\ | ||||
| <option value="42" data-type="AA">PWM CCT</option>\ | ||||
| <option value="43" data-type="AAA">PWM RGB</option>\ | ||||
| <option value="44" data-type="AAAA">PWM RGBW</option>\ | ||||
| <option value="45" data-type="AAAAA">PWM RGB+CCT</option>\ | ||||
| <!--option value="46" data-type="AAAAAA">PWM RGB+DCCT</option-->'} | ||||
| <option value="80" data-type="V">DDP RGB (network)</option> | ||||
| <!--option value="81" data-type="V">E1.31 RGB (network)</option--> | ||||
| <option value="82" data-type="V">Art-Net RGB (network)</option> | ||||
| <option value="88" data-type="V">DDP RGBW (network)</option> | ||||
| <option value="89" data-type="V">Art-Net RGBW (network)</option> | ||||
| <option value="41">PWM White</option>\ | ||||
| <option value="42">PWM CCT</option>\ | ||||
| <option value="43">PWM RGB</option>\ | ||||
| <option value="44">PWM RGBW</option>\ | ||||
| <option value="45">PWM RGB+CCT</option>\ | ||||
| <!--option value="46">PWM RGB+DCCT</option-->'} | ||||
| <option value="80">DDP RGB (network)</option> | ||||
| <!--option value="81">E1.31 RGB (network)</option--> | ||||
| <option value="82">Art-Net RGB (network)</option> | ||||
| <option value="88">DDP RGBW (network)</option> | ||||
| <option value="89">Art-Net RGBW (network)</option> | ||||
| </select><br> | ||||
| <div id="abl${s}"> | ||||
| mA/LED: <select name="LAsel${s}" onchange="enLA(this,'${s}');UI();"> | ||||
| @@ -476,11 +460,6 @@ mA/LED: <select name="LAsel${s}" onchange="enLA(this,'${s}');UI();"> | ||||
| <div id="dig${s}a" style="display:inline"><br>Auto-calculate white channel from RGB:<br><select name="AW${s}"><option value=0>None</option><option value=1>Brighter</option><option value=2>Accurate</option><option value=3>Dual</option><option value=4>Max</option></select> </div> | ||||
| </div>`; | ||||
| 				f.insertAdjacentHTML("beforeend", cn); | ||||
| 				let sel = d.getElementsByName("LT"+s)[0] | ||||
| 				if (i >= maxB || digitalB >= maxD) disable(sel,'option[data-type="D"]'); | ||||
| 				if (i >= maxB || twopinB >= 1)     disable(sel,'option[data-type="2P"]'); | ||||
| 				disable(sel,`option[data-type^="${'A'.repeat(maxA-analogB+1)}"]`); | ||||
| 				sel.selectedIndex = sel.querySelector('option:not(:disabled)').index; | ||||
| 			} | ||||
| 			if (n==-1) { | ||||
| 				o[--i].remove();--i; | ||||
| @@ -843,7 +822,6 @@ Swap: <select id="xw${s}" name="XW${s}"> | ||||
| 		<div id="btns"></div> | ||||
| 		Disable internal pull-up/down: <input type="checkbox" name="IP"><br> | ||||
| 		Touch threshold: <input type="number" class="s" min="0" max="100" name="TT" required><br> | ||||
| 		<hr class="sml"> | ||||
| 		IR GPIO: <input type="number" min="-1" max="48" name="IR" onchange="UI()" class="xs"><select name="IT" onchange="UI()"> | ||||
| 		<option value=0>Remote disabled</option> | ||||
| 		<option value=1>24-key RGB</option> | ||||
| @@ -858,7 +836,6 @@ Swap: <select id="xw${s}" name="XW${s}"> | ||||
| 		Apply IR change to main segment only: <input type="checkbox" name="MSO"><br> | ||||
| 		<div id="json" style="display:none;">JSON file: <input type="file" name="data" accept=".json"><button type="button" class="sml" onclick="uploadFile('/ir.json')">Upload</button><br></div> | ||||
| 		<a href="https://kno.wled.ge/interfaces/infrared/" target="_blank">IR info</a><br> | ||||
| 		<hr class="sml"> | ||||
| 		Relay GPIO: <input type="number" min="-1" max="48" name="RL" onchange="UI()" class="xs"><span style="cursor: pointer;" onclick="off('RL')"> ✕</span><br> | ||||
| 		Invert <input type="checkbox" name="RM"> Open drain <input type="checkbox" name="RO"><br> | ||||
| 		<hr class="sml"> | ||||
|   | ||||
| @@ -210,7 +210,7 @@ void sendImprovInfoResponse() { | ||||
|   //Use serverDescription if it has been changed from the default "WLED", else mDNS name | ||||
|   bool useMdnsName = (strcmp(serverDescription, "WLED") == 0 && strlen(cmDNS) > 0); | ||||
|   char vString[20]; | ||||
|   sprintf_P(vString, PSTR("0.15.0-b4/%i"), VERSION); | ||||
|   sprintf_P(vString, PSTR("0.15.0-b3/%i"), VERSION); | ||||
|   const char *str[4] = {"WLED", vString, bString, useMdnsName ? cmDNS : serverDescription}; | ||||
|  | ||||
|   sendImprovRPCResult(ImprovRPCType::Request_Info, 4, str); | ||||
|   | ||||
| @@ -243,14 +243,10 @@ bool PinManagerClass::isPinOk(byte gpio, bool output) const | ||||
|   #if defined(CONFIG_IDF_TARGET_ESP32C3) | ||||
|     // strapping pins: 2, 8, & 9 | ||||
|     if (gpio > 11 && gpio < 18) return false;     // 11-17 SPI FLASH | ||||
|     #if ARDUINO_USB_CDC_ON_BOOT == 1 || ARDUINO_USB_DFU_ON_BOOT == 1 | ||||
|     if (gpio > 17 && gpio < 20) return false;     // 18-19 USB-JTAG | ||||
|     #endif | ||||
|   #elif defined(CONFIG_IDF_TARGET_ESP32S3) | ||||
|     // 00 to 18 are for general use. Be careful about straping pins GPIO0 and GPIO3 - these may be pulled-up or pulled-down on your board. | ||||
|     #if ARDUINO_USB_CDC_ON_BOOT == 1 || ARDUINO_USB_DFU_ON_BOOT == 1 | ||||
|     if (gpio > 18 && gpio < 21) return false;     // 19 + 20 = USB-JTAG. Not recommended for other uses. | ||||
|     #endif | ||||
|     if (gpio > 21 && gpio < 33) return false;     // 22 to 32: not connected + SPI FLASH | ||||
|     if (gpio > 32 && gpio < 38) return !psramFound(); // 33 to 37: not available if using _octal_ SPI Flash or _octal_ PSRAM | ||||
|     // 38 to 48 are for general use. Be careful about straping pins GPIO45 and GPIO46 - these may be pull-up or pulled-down on your board. | ||||
|   | ||||
| @@ -3,12 +3,12 @@ | ||||
| /* | ||||
|    Main sketch, global variable declarations | ||||
|    @title WLED project sketch | ||||
|    @version 0.15.0-b4 | ||||
|    @version 0.15.0-b3 | ||||
|    @author Christian Schwinne | ||||
|  */ | ||||
|  | ||||
| // version code in format yymmddb (b = daily build) | ||||
| #define VERSION 2406290 | ||||
| #define VERSION 2406190 | ||||
|  | ||||
| //uncomment this if you have a "my_config.h" file you'd like to use | ||||
| //#define WLED_USE_MY_CONFIG | ||||
|   | ||||
| @@ -356,9 +356,7 @@ void getSettingsJS(byte subPage, char* dest) | ||||
|     oappend(itoa(MAX_LEDS_PER_BUS,nS,10)); oappend(","); | ||||
|     oappend(itoa(MAX_LED_MEMORY,nS,10));   oappend(","); | ||||
|     oappend(itoa(MAX_LEDS,nS,10));         oappend(","); | ||||
|     oappend(itoa(WLED_MAX_COLOR_ORDER_MAPPINGS,nS,10)); oappend(","); | ||||
|     oappend(itoa(WLED_MAX_DIGITAL_CHANNELS,nS,10)); oappend(","); | ||||
|     oappend(itoa(WLED_MAX_ANALOG_CHANNELS,nS,10)); | ||||
|     oappend(itoa(WLED_MAX_COLOR_ORDER_MAPPINGS,nS,10)); | ||||
|     oappend(SET_F(");")); | ||||
|  | ||||
|     sappend('c',SET_F("MS"),autoSegments); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Blaz Kristan
					Blaz Kristan