add flash_real to tasmota.memory()

This commit is contained in:
Stephan Hadinger 2022-05-09 22:54:40 +02:00
parent 350b670fa0
commit 722ee882fc

View File

@ -182,7 +182,8 @@ extern "C" {
int32_t top = be_top(vm); // Get the number of arguments
if (top == 1) { // no argument (instance only)
be_newobject(vm, "map");
be_map_insert_int(vm, "flash", ESP_getFlashChipRealSize() / 1024);
be_map_insert_int(vm, "flash", ESP.getFlashChipSize() / 1024);
be_map_insert_int(vm, "flash_real", ESP_getFlashChipRealSize() / 1024);
be_map_insert_int(vm, "program", ESP_getSketchSize() / 1024);
be_map_insert_int(vm, "program_free", ESP_getFreeSketchSpace() / 1024);
be_map_insert_int(vm, "heap_free", ESP_getFreeHeap() / 1024);