using printf with \r help
Posted: Fri Dec 13, 2024 5:03 am
when I printf using the \r option only nothing goes to the terminal.
I want to be able to print on the same line without a CR.
for (int i = 10; i >= 0; i--) {
printf("Restarting in %d seconds...\r", i);
vTaskDelay(1000 / portTICK_PERIOD_MS);
}
This prints nothing, even if I use fflush(stdout); after the printf.
Anyone have any ideas to do this ?
I want to be able to print on the same line without a CR.
for (int i = 10; i >= 0; i--) {
printf("Restarting in %d seconds...\r", i);
vTaskDelay(1000 / portTICK_PERIOD_MS);
}
This prints nothing, even if I use fflush(stdout); after the printf.
Anyone have any ideas to do this ?