Version screen: copyright 2026, aligned thread table (issue #93)

The copyright year is 2026. The thread table of the tinySA Ultra did not
line up: the font is proportional and a space is narrower than a digit or
letter, so padding with spaces moved the columns (e.g. "idle", priority 1).
The numbers are now zero padded, the name follows them and the state is
drawn at a fixed position.

Tested on a ZS407. tinySA Ultra +16 B, BASIC unchanged.
copilot/add-multi-platform-rf-scan-exports
erikkaashoek 4 weeks ago
parent 515c2d19cf
commit 933d510a23

@ -96,7 +96,7 @@ uint16_t redraw_request = 0; // contains REDRAW_XXX flags
// Version text, displayed in Config->Version menu, also send by info command
const char * const info_about[]={
BOARD_NAME,
"2019-2024 Copyright @Erik Kaashoek",
"2019-2026 Copyright @Erik Kaashoek",
"2016-2020 Copyright @edy555",
"SW licensed under GPL. See: https://github.com/erikkaashoek/tinySA",
"Version: " VERSION,

@ -707,10 +707,12 @@ extern const char *states[];
#else
uint32_t stklimit = 0U;
#endif
lcd_printf(x, y+=bFONT_STR_HEIGHT, "%08x|%08x|%08x|%08x|%4u|%4u|%9s|%12s",
// The font is proportional (a space is narrower than a digit), padding with spaces does not align:
// zero padded numbers, the name after them, the state at a fixed position
lcd_printf(x, y+=bFONT_STR_HEIGHT, "%08x|%08x|%08x|%08x|%u|%03u|%s",
stklimit, (uint32_t)tp->ctx.sp, max_stack_use, (uint32_t)tp,
(uint32_t)tp->refs - 1, (uint32_t)tp->prio, states[tp->state],
tp->name == NULL ? "" : tp->name);
(uint32_t)tp->refs - 1, (uint32_t)tp->prio, tp->name == NULL ? "" : tp->name);
lcd_printf(x + 330, y, "%s", states[tp->state]);
tp = chRegNextThread(tp);
} while (tp != NULL);
#endif

Loading…
Cancel
Save

Powered by TurnKey Linux.