fix(diag): real heap-free via mallinfo, flush-align Errors row

sbrk(0)-high-water counted freed-and-recycled blocks as permanently
used, understating free heap. mallinfo().uordblks reflects bytes
actually outstanding. Also strip the trailing space from the decoded
error-flag string so right-alignment sits flush.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-06-19 23:00:40 +02:00
parent 11a3799a47
commit aba924bac9
2 changed files with 10 additions and 5 deletions

View File

@@ -110,6 +110,8 @@ class DiagnosticsScreen : public UIScreen {
if (err & ERR_EVENT_FULL) strcat(buf, "F ");
if (err & ERR_EVENT_CAD_TIMEOUT) strcat(buf, "C ");
if (err & ERR_EVENT_STARTRX_TIMEOUT) strcat(buf, "R ");
int len = strlen(buf); // drop the trailing space so right-alignment sits flush
if (len > 0 && buf[len - 1] == ' ') buf[len - 1] = '\0';
}
addRow("Errors", buf);
}