Fix wrong format specifier for axis label

_monitor_display() used %C (wide character, expects wint_t) instead
of %c (plain char/int) to print the X/Y/Z axis label. Every other
single-character display in the codebase uses %c; on the embedded
build, without wide-char support in the C library, %C is not a
valid conversion for the char actually being passed.
This commit is contained in:
Konrad Rieck
2026-07-27 22:12:22 +02:00
parent c742e92e7f
commit bf25776a66
+1 -1
View File
@@ -384,7 +384,7 @@ static void _monitor_display(lis2dw_monitor_state_t *state)
{
char buf[10];
snprintf(buf, sizeof(buf), " %C ", "XYZ"[state->axis]);
snprintf(buf, sizeof(buf), " %c ", "XYZ"[state->axis]);
watch_display_text_with_fallback(WATCH_POSITION_TOP_LEFT, buf, buf);
snprintf(buf, sizeof(buf), "%2d", state->axis + 1);