Skip to content

Commit

Permalink
main: rotor: erase immediately after send
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
James Tavares committed Nov 14, 2022
1 parent 2b175c9 commit 6eb5e8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion firmware/apps/cardem/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 6eb5e8b

Please sign in to comment.