small changes to info page
- added "max used PSRAM" info - moved all mem infos into one part - only check PSRAM if BOARD_HAS_PSRAM - oappend: debug message in case that stack buffer is too small.
This commit is contained in:
@@ -502,6 +502,7 @@ void show_psram_info_part2(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if 0 // this test makes the "max used PSRAM" info unusable
|
||||||
// try to allocate PSRAM (one 640KB chunk so we can be sure it will not fit into DRAM)
|
// try to allocate PSRAM (one 640KB chunk so we can be sure it will not fit into DRAM)
|
||||||
void * buff2 = ps_malloc(640 * 1024);
|
void * buff2 = ps_malloc(640 * 1024);
|
||||||
uint8_t * buf = (uint8_t*)malloc(620 * 1024);
|
uint8_t * buf = (uint8_t*)malloc(620 * 1024);
|
||||||
@@ -518,6 +519,7 @@ void show_psram_info_part2(void)
|
|||||||
free(buf);
|
free(buf);
|
||||||
Serial.println("* Can allocate big memory with malloc()");
|
Serial.println("* Can allocate big memory with malloc()");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -667,16 +667,19 @@ ${urows===""?'':'<tr><td colspan=2><hr style="height:1px;border-width:0;color:gr
|
|||||||
${inforow("Build",i.vid)}
|
${inforow("Build",i.vid)}
|
||||||
${inforow("Signal strength",i.wifi.signal +"% ("+ i.wifi.rssi, " dBm)")}
|
${inforow("Signal strength",i.wifi.signal +"% ("+ i.wifi.rssi, " dBm)")}
|
||||||
${inforow("Uptime",getRuntimeStr(i.uptime))}
|
${inforow("Uptime",getRuntimeStr(i.uptime))}
|
||||||
${theap>0?inforow("Total heap",theap," kB"):""}
|
|
||||||
${inforow("Free heap",heap," kB")}
|
|
||||||
${i.tpram?inforow("Total PSRAM",(i.tpram/1024).toFixed(1)," kB"):""}
|
|
||||||
${i.psram?inforow("Used PSRAM",(i.tpram-i.psram)," B"):""}
|
|
||||||
${inforow("Estimated current",pwru)}
|
${inforow("Estimated current",pwru)}
|
||||||
${inforow("Average FPS",i.leds.fps)}
|
${inforow("Average FPS",i.leds.fps)}
|
||||||
|
<!-- WLEDSR begin-->
|
||||||
|
<tr><td colspan=2><hr style="height:1px;border-width:0;color:SeaGreen;background-color:SeaGreen"></td></tr>
|
||||||
${inforow("MAC address",i.mac)}
|
${inforow("MAC address",i.mac)}
|
||||||
${inforow("Filesystem",i.fs.u + "/" + i.fs.t + " kB (" +Math.round(i.fs.u*100/i.fs.t) + "%)")}
|
${inforow("Filesystem",i.fs.u + "/" + i.fs.t + " kB (" +Math.round(i.fs.u*100/i.fs.t) + "%)")}
|
||||||
${inforow("Environment",i.arch + " " + i.core + " (" + i.lwip + ")")}
|
${inforow("Environment",i.arch + " " + i.core + " (" + i.lwip + ")")}
|
||||||
<!-- WLEDSR begin-->
|
${theap>0?inforow("Total heap",theap," kB"):""}
|
||||||
|
${theap>0?inforow("used heap",((i.totalheap-i.freeheap)/1000).toFixed(1)," kB"):inforow("Free heap",heap," kB")}
|
||||||
|
${i.minfreeheap?inforow("Max used heap",((i.totalheap-i.minfreeheap)/1000).toFixed(1)," kB"):""}
|
||||||
|
${i.tpram?inforow("Total PSRAM",(i.tpram/1024).toFixed(1)," kB"):""}
|
||||||
|
${i.psram?((i.tpram-i.psram)>16383?inforow("Used PSRAM",((i.tpram-i.psram)/1024).toFixed(1)," kB"):inforow("Used PSRAM",(i.tpram-i.psram)," B")):""}
|
||||||
|
${i.psusedram?((i.tpram-i.psusedram)>16383?inforow("Max Used PSRAM",((i.tpram-i.psusedram)/1024).toFixed(1)," kB"):inforow("Max Used PSRAM",(i.tpram-i.psusedram)," B")):""}
|
||||||
<tr><td colspan=2><hr style="height:1px;border-width:0;color:SeaGreen;background-color:SeaGreen"></td></tr>
|
<tr><td colspan=2><hr style="height:1px;border-width:0;color:SeaGreen;background-color:SeaGreen"></td></tr>
|
||||||
${i.e32model?inforow(i.e32model,i.e32cores +" core(s)"," "+i.e32speed+" Mhz"):""}
|
${i.e32model?inforow(i.e32model,i.e32cores +" core(s)"," "+i.e32speed+" Mhz"):""}
|
||||||
${i.e32flash?inforow("Flash "+i.e32flash+" MB"+", mode "+i.e32flashmode+i.e32flashtext,i.e32flashspeed," Mhz"):""}
|
${i.e32flash?inforow("Flash "+i.e32flash+" MB"+", mode "+i.e32flashmode+i.e32flashtext,i.e32flashspeed," Mhz"):""}
|
||||||
|
|||||||
@@ -767,9 +767,18 @@ void serializeInfo(JsonObject root)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
root[F("freeheap")] = ESP.getFreeHeap();
|
root[F("freeheap")] = ESP.getFreeHeap();
|
||||||
#if defined(ARDUINO_ARCH_ESP32) && defined(WLED_USE_PSRAM)
|
root[F("minfreeheap")] = ESP.getMinFreeHeap();
|
||||||
if (psramFound()) root[F("tpram")] = ESP.getPsramSize(); //WLEDSR
|
#if defined(ARDUINO_ARCH_ESP32) && defined(WLED_USE_PSRAM) && defined(BOARD_HAS_PSRAM)
|
||||||
if (psramFound()) root[F("psram")] = ESP.getFreePsram();
|
if (psramFound()) {
|
||||||
|
root[F("tpram")] = ESP.getPsramSize(); //WLEDSR
|
||||||
|
root[F("psram")] = ESP.getFreePsram();
|
||||||
|
root[F("psusedram")] = ESP.getMinFreePsram();
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
// for testing
|
||||||
|
// root[F("tpram")] = 4194304; //WLEDSR
|
||||||
|
// root[F("psram")] = 4193000;
|
||||||
|
// root[F("psusedram")] = 3083000;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// begin WLEDSR
|
// begin WLEDSR
|
||||||
|
|||||||
@@ -148,8 +148,10 @@ bool oappendi(int i)
|
|||||||
bool oappend(const char* txt)
|
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."));
|
||||||
return false; // buffer full
|
return false; // buffer full
|
||||||
|
}
|
||||||
strcpy(obuf + olen, txt);
|
strcpy(obuf + olen, txt);
|
||||||
olen += len;
|
olen += len;
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -457,6 +457,15 @@ void WLED::setup()
|
|||||||
#if defined(ARDUINO_ARCH_ESP32) && defined(WLED_DISABLE_BROWNOUT_DET)
|
#if defined(ARDUINO_ARCH_ESP32) && defined(WLED_DISABLE_BROWNOUT_DET)
|
||||||
WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 1); //enable brownout detector
|
WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 1); //enable brownout detector
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ARDUINO_ARCH_ESP32
|
||||||
|
#ifdef ARDUINO_RUNNING_CORE
|
||||||
|
DEBUG_PRINTF("Arduino core=%d (loop is now on core #%d)\n", int(ARDUINO_RUNNING_CORE), int(xPortGetCoreID()));
|
||||||
|
#endif
|
||||||
|
#ifdef ARDUINO_EVENT_RUNNING_CORE
|
||||||
|
DEBUG_PRINTF("Arduino Event core=%d\n", int(ARDUINO_EVENT_RUNNING_CORE));
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void WLED::beginStrip()
|
void WLED::beginStrip()
|
||||||
|
|||||||
Reference in New Issue
Block a user