Add "%" after fragmentation values

This commit is contained in:
fvanroie 2022-09-29 20:19:52 +02:00
parent 0325954649
commit a7e75d8632

View File

@ -716,7 +716,7 @@ void hasp_get_info(JsonDocument& doc)
info[F(D_INFO_FREE_HEAP)] = 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_FRAGMENTATION)] = haspDevice.get_heap_fragmentation();
info[F(D_INFO_FRAGMENTATION)] = String(haspDevice.get_heap_fragmentation()) + "%";
#if ARDUINO_ARCH_ESP32
if(psramFound()) {
@ -734,7 +734,7 @@ void hasp_get_info(JsonDocument& doc)
info[F(D_INFO_TOTAL_MEMORY)] = 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_FRAGMENTATION)] = mem_mon.frag_pct;
info[F(D_INFO_FRAGMENTATION)] = String(mem_mon.frag_pct) + "%";
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////