From 6eb5e8b6028a21dd55e35c0657865f4c55db026c Mon Sep 17 00:00:00 2001 From: James Tavares Date: Fri, 28 Oct 2022 15:06:08 -0400 Subject: [PATCH] main: rotor: erase immediately after send - improves trace diagnostic output by moving cursor back over the the rotor before a diagnostic message has a chance to be printed. there is still a race condition, but it is much better. Change-Id: Iad7767f2a5dbbd67b0f33b9bfc2c3864ce308990 --- firmware/apps/cardem/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firmware/apps/cardem/main.c b/firmware/apps/cardem/main.c index 4c337c86..6372e04f 100644 --- a/firmware/apps/cardem/main.c +++ b/firmware/apps/cardem/main.c @@ -194,8 +194,8 @@ extern int main(void) WDT_Restart(WDT); #if TRACE_LEVEL >= TRACE_LEVEL_DEBUG const char rotor[] = { '-', '\\', '|', '/' }; - putchar('\b'); putchar(rotor[i++ % ARRAY_SIZE(rotor)]); + putchar('\b'); #endif check_exec_dbg_cmd(); osmo_timers_prepare();