canbusload: redraw mode: use less screen estate

Use less screen estate by not printing unneeded newlines in redraw
mode.
pull/461/head
Marc Kleine-Budde 2023-09-27 12:35:18 +02:00
parent 92adbda471
commit 84919edbaa
1 changed files with 5 additions and 2 deletions

View File

@ -223,6 +223,7 @@ void printstats(int signo)
if (color)
printf("%s", ATTRESET);
if (!redraw || (i < currmax - 1))
printf("\n");
stat[i].recv_frames = 0;
@ -231,7 +232,9 @@ void printstats(int signo)
stat[i].recv_bits_payload = 0;
}
if (!redraw)
printf("\n");
fflush(stdout);
alarm(1);