From e799cb5bd1432da49d5d5a1e8fd79c08bceee763 Mon Sep 17 00:00:00 2001 From: Ewoud Date: Tue, 29 Nov 2022 15:32:26 +0100 Subject: [PATCH] CustomFX, platformIO and bin name: small updates platformio: - remove ABL_MILLIAMPS_DEFAULT from build_flags_min, set default 1500 in const.h - add default in wemos_shield_esp32_4MB_max_base - add wemos_shield_esp32_16MB_SPM1423_max arti_wled.h: bugfix use all leds in 2D usermod_v2_customeffects.h: fill black if call==0 index.js and xml.cpp: bin name: replace one _ by ' ' to enable line wrap in info tab and ota update --- package-lock.json | 4 ++-- package.json | 2 +- platformio.ini | 19 +++++++++++++------ usermods/audioreactive/audio_reactive.h | 5 +++-- usermods/customeffects/arti_wled.h | 7 +++++-- .../customeffects/usermod_v2_customeffects.h | 4 +++- wled00/const.h | 2 +- wled00/data/index.js | 2 +- wled00/html_ui.h | 6 +++--- wled00/wled.h | 2 +- wled00/xml.cpp | 2 +- 11 files changed, 34 insertions(+), 21 deletions(-) diff --git a/package-lock.json b/package-lock.json index b3dbc26f..3172c9f8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "wled", - "version": "0.14.0.7", + "version": "0.14.0.8", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "wled", - "version": "0.14.0.7", + "version": "0.14.0.8", "license": "ISC", "dependencies": { "clean-css": "^4.2.3", diff --git a/package.json b/package.json index c1a49d5d..d8e11e18 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wled", - "version": "0.14.0.7", + "version": "0.14.0.8", "description": "Tools for WLED project", "main": "tools/cdata.js", "directories": { diff --git a/platformio.ini b/platformio.ini index eaeab594..f93278b8 100644 --- a/platformio.ini +++ b/platformio.ini @@ -590,7 +590,6 @@ build_flags_min = -Wno-attributes -Wno-unused-variable -Wno-unused-function -Wno-deprecated-declarations ;disables some stupid warnings -D WLED_DISABLE_BLYNK ; BLYNK is only provided for backwards compatibility (no new users accepted) ;-D WLED_DISABLE_BROWNOUT_DET ; enable if you get "brownout detected" errors at startup - -D ABL_MILLIAMPS_DEFAULT=1500 ; 850 not enough for 1024 leds -D WLED_USE_MY_CONFIG -D USERMOD_AUDIOREACTIVE -D UM_AUDIOREACTIVE_USE_NEW_FFT ; use latest (upstream) FFTLib, instead of older library midified by blazoncek. Slightly faster, more accurate, needs 2KB RAM extra @@ -863,10 +862,10 @@ board_build.flash_mode = qio # custom board configurations # ------------------------------------------------------------------------------ -;wemos_shield_esp32_4MB_max_base: base entry, uses esp32_4MB_max_base [wemos_shield_esp32_4MB_max_base] extends = esp32_4MB_max_base build_flags = ${esp32_4MB_max_base.build_flags} + -D ABL_MILLIAMPS_DEFAULT=9500 ; Wemos max 10A -D LEDPIN=16 -D RLYPIN=19 -D BTNPIN=17 @@ -884,12 +883,10 @@ build_flags = ${esp32_4MB_max_base.build_flags} ; -D WLED_DISABLE_INFRARED ; -D WLED_ENABLE_DMX -;wemos_shield_esp32_4MB_max: bin entry, uses wemos_shield_esp32_4MB_max_base [env:wemos_shield_esp32_4MB_max] extends = wemos_shield_esp32_4MB_max_base build_flags = ${wemos_shield_esp32_4MB_max_base.build_flags} -D WLED_RELEASE_NAME=wemos_shield_esp32_4MB_max ; This will be included in the firmware.bin filename - ; -D SR_DMTYPE=1 -D I2S_SDPIN=32 -D I2S_WSPIN=15 -D I2S_CKPIN=14 ;; for regular I2S microphone softhack: can be removed because this is default in code ; RAM: [== ] 24.4% (used 79820 bytes from 327680 bytes) ; Flash: [========= ] 88.6% (used 1393421 bytes from 1572864 bytes) @@ -897,7 +894,7 @@ build_flags = ${wemos_shield_esp32_4MB_max_base.build_flags} extends = wemos_shield_esp32_4MB_max_base build_flags = ${wemos_shield_esp32_4MB_max_base.build_flags} -D WLED_RELEASE_NAME=wemos_shield_esp32_4MB_ICS4343x_max ; This will be included in the firmware.bin filename - ; -D SR_DMTYPE=1 -D I2S_SDPIN=32 -D I2S_WSPIN=15 -D I2S_CKPIN=14 ;; for regular I2S microphone softhack: can be removed because this is default in code + -D SR_DMTYPE=1 -D I2S_SDPIN=32 -D I2S_WSPIN=15 -D I2S_CKPIN=14 ; for regular I2S microphone -D SR_SQUELCH=10 -D SR_GAIN=30 -D SR_FREQ_PROF=5 ; ICS-43434 specific ; RAM: [== ] 24.4% (used 79820 bytes from 327680 bytes) ; Flash: [========= ] 88.6% (used 1393421 bytes from 1572864 bytes) @@ -918,7 +915,6 @@ build_flags = ${wemos_shield_esp32_4MB_max_base.build_flags} -D SR_DMTYPE=4 -D MCLK_PIN=0 -D I2S_SDPIN=25 -D I2S_WSPIN=15 -D I2S_CKPIN=14 ; for audio Line-In shield -D SR_SQUELCH=2 -D SR_GAIN=40 -D SR_FREQ_PROF=1 ; CS5343 Line-In specific -;wemos_shield_esp32_16MB_max: bin entry, uses wemos_shield_esp32_4MB_max_base and adds 16MB settings [env:wemos_shield_esp32_16MB_max] extends = wemos_shield_esp32_4MB_max_base board = esp32_twilord ; "TwilightLord" ESP32 with 16MB Flash @@ -928,6 +924,17 @@ build_flags = ${wemos_shield_esp32_4MB_max_base.build_flags} ; RAM: [== ] 24.4% (used 79820 bytes from 327680 bytes) ; Flash: [======= ] 66.4% (used 1393421 bytes from 2097152 bytes) +[env:wemos_shield_esp32_16MB_SPM1423_max] +extends = wemos_shield_esp32_4MB_max_base +board = esp32_twilord ; "TwilightLord" ESP32 with 16MB Flash +board_build.partitions = tools/WLED_ESP32_16MB.csv ; for esp32_twilord with 16MB flash +build_flags = ${wemos_shield_esp32_4MB_max_base.build_flags} + -D WLED_RELEASE_NAME=wemos_shield_esp32_16MB_SPM1423_max ; This will be included in the firmware.bin filename + -D SR_DMTYPE=5 -D I2S_SDPIN=32 -D I2S_WSPIN=15 -D I2S_CKPIN=-1 ; for I2S PDM microphone + -D SR_SQUELCH=3 -D SR_GAIN=75 -D SR_FREQ_PROF=7 ; SPM1423 specific +; RAM: [== ] 24.4% (used 79820 bytes from 327680 bytes) +; Flash: [========= ] 88.6% (used 1393421 bytes from 1572864 bytes) + ; ESP32 WLED pico board with builtin ICS-43432 microphpone [env:esp32_pico_4MB_max] extends = esp32_4MB_max_base diff --git a/usermods/audioreactive/audio_reactive.h b/usermods/audioreactive/audio_reactive.h index 4b2996db..5cce050f 100644 --- a/usermods/audioreactive/audio_reactive.h +++ b/usermods/audioreactive/audio_reactive.h @@ -1799,7 +1799,7 @@ class AudioReactive : public Usermod { JsonObject freqScale = top.createNestedObject("frequency"); freqScale[F("scale")] = FFTScalingMode; - freqScale[F("profile")] = pinkIndex; + freqScale[F("profile")] = pinkIndex; //WLEDMM JsonObject sync = top.createNestedObject("sync"); sync[F("port")] = audioSyncPort; @@ -1859,7 +1859,7 @@ class AudioReactive : public Usermod { configComplete &= getJsonValue(top["dynamics"][F("fall")], decayTime); configComplete &= getJsonValue(top["frequency"][F("scale")], FFTScalingMode); - configComplete &= getJsonValue(top["frequency"][F("profile")], pinkIndex); + configComplete &= getJsonValue(top["frequency"][F("profile")], pinkIndex); //WLEDMM configComplete &= getJsonValue(top["sync"][F("port")], audioSyncPort); configComplete &= getJsonValue(top["sync"][F("mode")], audioSyncEnabled); @@ -1900,6 +1900,7 @@ class AudioReactive : public Usermod { oappend(SET_F("addOption(dd,'Square Root (Energy)',3);")); oappend(SET_F("addOption(dd,'Logarithmic (Loudness)',1);")); + //WLEDMM oappend(SET_F("dd=addDropdown('AudioReactive','frequency:profile');")); oappend(SET_F("addOption(dd,'Generic Microphone',0);")); oappend(SET_F("addOption(dd,'Generic Line-In',1);")); diff --git a/usermods/customeffects/arti_wled.h b/usermods/customeffects/arti_wled.h index 2187f75a..acff001e 100644 --- a/usermods/customeffects/arti_wled.h +++ b/usermods/customeffects/arti_wled.h @@ -507,9 +507,12 @@ bool ARTI::loop() for (int i = 0; i< arti_get_external_variable(F_ledCount); i++) { - ar->set(function_symbol->function_scope->symbols[0]->scope_index, i%strip.matrixWidth); // set x - if (function_symbol->function_scope->nrOfFormals == 2) // 2D + if (function_symbol->function_scope->nrOfFormals == 2) {// 2D + ar->set(function_symbol->function_scope->symbols[0]->scope_index, i%strip.matrixWidth); // set x ar->set(function_symbol->function_scope->symbols[1]->scope_index, i/strip.matrixWidth); // set y + } + else + ar->set(function_symbol->function_scope->symbols[0]->scope_index, i); // set x this->callStack->push(ar); diff --git a/usermods/customeffects/usermod_v2_customeffects.h b/usermods/customeffects/usermod_v2_customeffects.h index c88a5a5f..5a53b9e5 100644 --- a/usermods/customeffects/usermod_v2_customeffects.h +++ b/usermods/customeffects/usermod_v2_customeffects.h @@ -14,8 +14,10 @@ uint16_t mode_customEffect(void) { static bool notEnoughHeap; static char previousEffect[charLength]; - if (SEGENV.call == 0) + if (SEGENV.call == 0) { strcpy(previousEffect, ""); //force init + SEGMENT.fill(BLACK); //in case not all leds used e.g. when using expand 1d Circles. Tbd: fill black should never be used to allow for blends/transitions + } char currentEffect[charLength]; strcpy(currentEffect, (SEGMENT.name != nullptr)?SEGMENT.name:"default"); //note: switching preset with segment name to preset without does not clear the SEGMENT.name variable, but not gonna solve here ;-) diff --git a/wled00/const.h b/wled00/const.h index a6ffe0a5..41cda68e 100644 --- a/wled00/const.h +++ b/wled00/const.h @@ -334,7 +334,7 @@ #endif #ifndef ABL_MILLIAMPS_DEFAULT - #define ABL_MILLIAMPS_DEFAULT 850 // auto lower brightness to stay close to milliampere limit + #define ABL_MILLIAMPS_DEFAULT 1500 // auto lower brightness to stay close to milliampere limit WLEDMM: min 1500 for 1024leds #else #if ABL_MILLIAMPS_DEFAULT == 0 // disable ABL #elif ABL_MILLIAMPS_DEFAULT < 250 // make sure value is at least 250 diff --git a/wled00/data/index.js b/wled00/data/index.js index 3615b8d8..764da592 100644 --- a/wled00/data/index.js +++ b/wled00/data/index.js @@ -664,7 +664,7 @@ function populateInfo(i) //WLEDMM: add total heap and total PSRAM, and build number, add bin name if (i.ver.includes("0.14.1.")) vcn = "Sitting Ducks"; // easter egg if (i.ver.includes("0.14.0.")) vcn = "Lupo"; // check for MM versioning scheme - cn += `v${i.ver}  "${vcn}"

(WLEDMM_${i.ver}_${i.rel}.bin)

build ${i.vid}

+ cn += `v${i.ver}  "${vcn}"

(WLEDMM_${i.ver} ${i.rel}.bin)

build ${i.vid}

${urows} ${urows===""?'':''} ${i.opt&0x100?inforow("Debug",""):''} diff --git a/wled00/html_ui.h b/wled00/html_ui.h index 5613cdad..65f686aa 100644 --- a/wled00/html_ui.h +++ b/wled00/html_ui.h @@ -1069,8 +1069,8 @@ const uint8_t PAGE_index[] PROGMEM = { 0x29, 0x23, 0xfb, 0xa5, 0x9a, 0x1a, 0xb9, 0x4c, 0x85, 0xdb, 0x1b, 0xb6, 0x71, 0x1b, 0x21, 0x39, 0xbb, 0xe4, 0x67, 0x3f, 0x1b, 0x5a, 0x26, 0x4f, 0xd7, 0xa3, 0x11, 0x70, 0x4c, 0xcc, 0x3c, 0xe7, 0xe8, 0x59, 0xea, 0xef, 0xb0, 0x6a, 0xc0, 0x6a, 0x33, 0xe7, 0xe9, 0x71, 0xcb, 0xad, 0x14, 0x6e, - 0x6b, 0x9e, 0x9f, 0xff, 0xa7, 0x97, 0x8d, 0x3c, 0xd8, 0xaa, 0x3e, 0xcf, 0xb4, 0x34, 0x43, 0x20, - 0x47, 0x2e, 0xe1, 0xff, 0xea, 0x60, 0x0b, 0xcf, 0x99, 0x74, 0x38, 0x92, 0x4d, 0xeb, 0xc0, 0x9a, + 0x6b, 0x9e, 0x9f, 0xff, 0xa7, 0x9f, 0x0d, 0x1f, 0x6c, 0x55, 0x9f, 0x67, 0x5a, 0x9a, 0x21, 0x90, + 0x23, 0x97, 0xf0, 0x7f, 0x75, 0xb0, 0x85, 0xe7, 0x4c, 0x3a, 0xe4, 0xeb, 0x48, 0xeb, 0xc0, 0x9a, 0x07, 0x49, 0xe4, 0x2b, 0xb9, 0x67, 0x0c, 0xf8, 0xf0, 0x3f, 0x66, 0xe6, 0x1c, 0xff, 0xa2, 0x8f, 0x40, 0xdd, 0xdc, 0xe6, 0xf9, 0xea, 0x37, 0xdf, 0x52, 0x69, 0xea, 0x78, 0x4a, 0xa2, 0x9e, 0xdb, 0xfa, 0xde, 0xb7, 0x3d, 0xfb, 0x83, 0x77, 0x98, 0x26, 0xb8, 0xae, 0x98, 0x5d, 0x4f, 0xcd, 0x2e, @@ -2008,5 +2008,5 @@ const uint8_t PAGE_index[] PROGMEM = { 0x7e, 0xb7, 0x90, 0x82, 0x4a, 0x9e, 0x63, 0x77, 0x71, 0xc2, 0x9e, 0x53, 0xc4, 0xa0, 0x14, 0x17, 0x81, 0x43, 0xee, 0x17, 0x6f, 0x8a, 0xec, 0x4a, 0xde, 0x0b, 0x35, 0xde, 0xd0, 0x83, 0x2f, 0x12, 0xa2, 0x0c, 0x97, 0x67, 0x4b, 0x73, 0x6b, 0xb4, 0x8b, 0x44, 0xaa, 0xf8, 0xf7, 0xb2, 0xba, 0x4a, - 0x86, 0xce, 0xff, 0x02, 0xab, 0xdb, 0x29, 0xb3, 0x0d, 0x8f, 0x01, 0x00 + 0x86, 0xce, 0xff, 0x02, 0xbd, 0x6a, 0xeb, 0xa9, 0x0d, 0x8f, 0x01, 0x00 }; diff --git a/wled00/wled.h b/wled00/wled.h index 7726a730..edb3dd55 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -8,7 +8,7 @@ */ // version code in format yymmddb (b = daily build) -#define VERSION 2211280 +#define VERSION 2211290 //uncomment this if you have a "my_config.h" file you'd like to use //#define WLED_USE_MY_CONFIG diff --git a/wled00/xml.cpp b/wled00/xml.cpp index d0139de2..62ee8c2c 100644 --- a/wled00/xml.cpp +++ b/wled00/xml.cpp @@ -718,7 +718,7 @@ void getSettingsJS(byte subPage, char* dest) sappends('m',SET_F("(\"sip\")[0]"),(char*)F("WLEDMM_")); olen -= 2; //delete "; oappend(versionString); - oappend(SET_F("_")); + oappend(SET_F(" ")); oappend(releaseString); oappend(SET_F(".bin
(")); #if defined(CONFIG_IDF_TARGET_ESP32C3)