mirror of
https://git.mirrors.martin98.com/https://github.com/luc-github/ESP3D.git
synced 2025-08-08 17:19:02 +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"
|
#include "user_interface.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
extern String formatBytes(size_t bytes);
|
||||||
|
|
||||||
//read a string
|
//read a string
|
||||||
//a string is multibyte + \0, this is won't work if 1 char is multibyte like chinese char
|
//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)
|
bool CONFIG::read_string(int pos, char byte_buffer[], int size_max)
|
||||||
@ -422,6 +425,9 @@ void CONFIG::print_config()
|
|||||||
} else {
|
} else {
|
||||||
Serial.println(F("Error reading E feed rate"));
|
Serial.println(F("Error reading E feed rate"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Serial.print(F("Free memory: "));
|
||||||
|
Serial.println(formatBytes(ESP.getFreeHeap()));
|
||||||
|
|
||||||
Serial.print(F("Captive portal: "));
|
Serial.print(F("Captive portal: "));
|
||||||
#ifdef CAPTIVE_PORTAL_FEATURE
|
#ifdef CAPTIVE_PORTAL_FEATURE
|
||||||
|
@ -542,7 +542,7 @@ void GetFreeMem(STORESTRINGS_CLASS & KeysList, STORESTRINGS_CLASS & ValuesList)
|
|||||||
{
|
{
|
||||||
//FreeMem
|
//FreeMem
|
||||||
KeysList.add(FPSTR(KEY_FREE_MEM));
|
KeysList.add(FPSTR(KEY_FREE_MEM));
|
||||||
ValuesList.add(intTostr(system_get_free_heap_size()));
|
ValuesList.add(intTostr(ESP.getFreeHeap()));
|
||||||
//FW Version
|
//FW Version
|
||||||
KeysList.add(FPSTR(KEY_FW_VER));
|
KeysList.add(FPSTR(KEY_FW_VER));
|
||||||
ValuesList.add(FPSTR(VALUE_FW_VERSION));
|
ValuesList.add(FPSTR(VALUE_FW_VERSION));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user