increase STACK_BUF_SIZE after PR#59
* increase buffer by 64 bytes (sting added in AR usermod) * better diag message when buffer is full * change "Arduino max stack" to debug message
This commit is contained in:
@@ -2473,7 +2473,7 @@ class AudioReactive : public Usermod {
|
|||||||
oappend(SET_F("addOption(dd,'Off',0);"));
|
oappend(SET_F("addOption(dd,'Off',0);"));
|
||||||
oappend(SET_F("addOption(dd,'Send',1);"));
|
oappend(SET_F("addOption(dd,'Send',1);"));
|
||||||
oappend(SET_F("addOption(dd,'Receive',2);"));
|
oappend(SET_F("addOption(dd,'Receive',2);"));
|
||||||
oappend(SET_F("addInfo('AudioReactive:sync:mode',1,'Sync audio data with other WLEDs');"));
|
oappend(SET_F("addInfo('AudioReactive:sync:mode',1,'<br> Sync audio data with other WLEDs');"));
|
||||||
|
|
||||||
oappend(SET_F("addInfo('AudioReactive:digitalmic:type',1,'<i>requires reboot!</i>');")); // 0 is field type, 1 is actual field
|
oappend(SET_F("addInfo('AudioReactive:digitalmic:type',1,'<i>requires reboot!</i>');")); // 0 is field type, 1 is actual field
|
||||||
|
|
||||||
|
|||||||
@@ -382,7 +382,7 @@
|
|||||||
#ifdef ESP8266
|
#ifdef ESP8266
|
||||||
#define SETTINGS_STACK_BUF_SIZE 2048
|
#define SETTINGS_STACK_BUF_SIZE 2048
|
||||||
#else
|
#else
|
||||||
#define SETTINGS_STACK_BUF_SIZE 3712 // WLEDMM added 512 bytes of margin (was 3096)
|
#define SETTINGS_STACK_BUF_SIZE 3776 // WLEDMM added 680 bytes of margin (was 3096) for audioreactive UI
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WLED_USE_ETHERNET
|
#ifdef WLED_USE_ETHERNET
|
||||||
|
|||||||
@@ -149,7 +149,10 @@ bool oappend(const char* txt)
|
|||||||
{
|
{
|
||||||
uint16_t len = strlen(txt);
|
uint16_t len = strlen(txt);
|
||||||
if (olen + len >= SETTINGS_STACK_BUF_SIZE) {
|
if (olen + len >= SETTINGS_STACK_BUF_SIZE) {
|
||||||
DEBUG_PRINTLN(F("oappend() error: buffer full. Increase SETTINGS_STACK_BUF_SIZE."));
|
USER_PRINT(F("oappend() error: buffer full. Increase SETTINGS_STACK_BUF_SIZE for "));
|
||||||
|
USER_PRINTF("%2u bytes \t\"", len /*1 + olen + len - SETTINGS_STACK_BUF_SIZE*/);
|
||||||
|
USER_PRINT(txt);
|
||||||
|
USER_PRINTLN(F("\""));
|
||||||
return false; // buffer full
|
return false; // buffer full
|
||||||
}
|
}
|
||||||
strcpy(obuf + olen, txt);
|
strcpy(obuf + olen, txt);
|
||||||
|
|||||||
@@ -526,7 +526,7 @@ void WLED::setup()
|
|||||||
DEBUG_PRINT(F("heap ")); DEBUG_PRINTLN(ESP.getFreeHeap());
|
DEBUG_PRINT(F("heap ")); DEBUG_PRINTLN(ESP.getFreeHeap());
|
||||||
#ifdef ARDUINO_ARCH_ESP32
|
#ifdef ARDUINO_ARCH_ESP32
|
||||||
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 4, 0) // unfortunately not availeable in older framework versions
|
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 4, 0) // unfortunately not availeable in older framework versions
|
||||||
USER_PRINT(F("\nArduino max stack ")); USER_PRINTLN(getArduinoLoopTaskStackSize());
|
DEBUG_PRINT(F("\nArduino max stack ")); DEBUG_PRINTLN(getArduinoLoopTaskStackSize());
|
||||||
#endif
|
#endif
|
||||||
DEBUG_PRINTF("%s min free stack %d\n", pcTaskGetTaskName(NULL), uxTaskGetStackHighWaterMark(NULL)); //WLEDMM
|
DEBUG_PRINTF("%s min free stack %d\n", pcTaskGetTaskName(NULL), uxTaskGetStackHighWaterMark(NULL)); //WLEDMM
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user