mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-25 20:26:41 +00:00
Add "%" after fragmentation values
This commit is contained in:
parent
0325954649
commit
a7e75d8632
@ -716,7 +716,7 @@ void hasp_get_info(JsonDocument& doc)
|
|||||||
info[F(D_INFO_FREE_HEAP)] = size_buf;
|
info[F(D_INFO_FREE_HEAP)] = size_buf;
|
||||||
Parser::format_bytes(haspDevice.get_free_max_block(), size_buf, sizeof(size_buf));
|
Parser::format_bytes(haspDevice.get_free_max_block(), size_buf, sizeof(size_buf));
|
||||||
info[F(D_INFO_FREE_BLOCK)] = size_buf;
|
info[F(D_INFO_FREE_BLOCK)] = size_buf;
|
||||||
info[F(D_INFO_FRAGMENTATION)] = haspDevice.get_heap_fragmentation();
|
info[F(D_INFO_FRAGMENTATION)] = String(haspDevice.get_heap_fragmentation()) + "%";
|
||||||
|
|
||||||
#if ARDUINO_ARCH_ESP32
|
#if ARDUINO_ARCH_ESP32
|
||||||
if(psramFound()) {
|
if(psramFound()) {
|
||||||
@ -734,7 +734,7 @@ void hasp_get_info(JsonDocument& doc)
|
|||||||
info[F(D_INFO_TOTAL_MEMORY)] = size_buf;
|
info[F(D_INFO_TOTAL_MEMORY)] = size_buf;
|
||||||
Parser::format_bytes(mem_mon.free_size, size_buf, sizeof(size_buf));
|
Parser::format_bytes(mem_mon.free_size, size_buf, sizeof(size_buf));
|
||||||
info[F(D_INFO_FREE_MEMORY)] = size_buf;
|
info[F(D_INFO_FREE_MEMORY)] = size_buf;
|
||||||
info[F(D_INFO_FRAGMENTATION)] = mem_mon.frag_pct;
|
info[F(D_INFO_FRAGMENTATION)] = String(mem_mon.frag_pct) + "%";
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
Loading…
x
Reference in New Issue
Block a user