mirror of
https://git.mirrors.martin98.com/https://github.com/luc-github/ESP3D.git
synced 2025-08-08 14:39:05 +08:00
Use ESP.getFreeHeap() instead of SDK function
Add free mem in config report
This commit is contained in:
parent
d7b1e486e2
commit
22af45d69f
@ -24,6 +24,9 @@ extern "C" {
|
||||
#include "user_interface.h"
|
||||
}
|
||||
|
||||
|
||||
extern String formatBytes(size_t bytes);
|
||||
|
||||
//read a string
|
||||
//a string is multibyte + \0, this is won't work if 1 char is multibyte like chinese char
|
||||
bool CONFIG::read_string(int pos, char byte_buffer[], int size_max)
|
||||
@ -422,6 +425,9 @@ void CONFIG::print_config()
|
||||
} else {
|
||||
Serial.println(F("Error reading E feed rate"));
|
||||
}
|
||||
|
||||
Serial.print(F("Free memory: "));
|
||||
Serial.println(formatBytes(ESP.getFreeHeap()));
|
||||
|
||||
Serial.print(F("Captive portal: "));
|
||||
#ifdef CAPTIVE_PORTAL_FEATURE
|
||||
|
@ -542,7 +542,7 @@ void GetFreeMem(STORESTRINGS_CLASS & KeysList, STORESTRINGS_CLASS & ValuesList)
|
||||
{
|
||||
//FreeMem
|
||||
KeysList.add(FPSTR(KEY_FREE_MEM));
|
||||
ValuesList.add(intTostr(system_get_free_heap_size()));
|
||||
ValuesList.add(intTostr(ESP.getFreeHeap()));
|
||||
//FW Version
|
||||
KeysList.add(FPSTR(KEY_FW_VER));
|
||||
ValuesList.add(FPSTR(VALUE_FW_VERSION));
|
||||
|
Loading…
x
Reference in New Issue
Block a user