From 9803cecee2b8c3c1559f586f3cc6fcfa2a45a1ab Mon Sep 17 00:00:00 2001 From: Frank Date: Mon, 1 Jul 2024 02:46:14 +0200 Subject: [PATCH] new idea to reduce stack buffer usage the JS string can be shortened, by putting the usermod into a variable `ux` that is used instead of repeating the string 'Aduioreactive'. For now its just an experiment, to see if the idea works on several browsers. --- usermods/audioreactive/audio_reactive.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usermods/audioreactive/audio_reactive.h b/usermods/audioreactive/audio_reactive.h index c466cee5..1a73fd49 100644 --- a/usermods/audioreactive/audio_reactive.h +++ b/usermods/audioreactive/audio_reactive.h @@ -2723,7 +2723,8 @@ class AudioReactive : public Usermod { void appendConfigData() { - oappend(SET_F("addInfo('AudioReactive:help',0,'');")); + oappend(SET_F("ux='AudioReactive';")); // fingers crossed that "ux" isn't already used as JS var, html post parameter or css style + oappend(SET_F("addInfo(ux+':help',0,'');")); #ifdef ARDUINO_ARCH_ESP32 //WLEDMM: add defaults #if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32S3) // -S3/-S2/-C3 don't support analog audio