mirror of
https://github.com/linux-can/can-utils.git
synced 2026-08-05 06:20:00 +02:00
canbusload: redraw mode: use less screen estate
Use less screen estate by not printing unneeded newlines in redraw mode.
This commit is contained in:
+5
-2
@@ -223,7 +223,8 @@ void printstats(int signo)
|
|||||||
if (color)
|
if (color)
|
||||||
printf("%s", ATTRESET);
|
printf("%s", ATTRESET);
|
||||||
|
|
||||||
printf("\n");
|
if (!redraw || (i < currmax - 1))
|
||||||
|
printf("\n");
|
||||||
|
|
||||||
stat[i].recv_frames = 0;
|
stat[i].recv_frames = 0;
|
||||||
stat[i].recv_bits_total = 0;
|
stat[i].recv_bits_total = 0;
|
||||||
@@ -231,7 +232,9 @@ void printstats(int signo)
|
|||||||
stat[i].recv_bits_payload = 0;
|
stat[i].recv_bits_payload = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("\n");
|
if (!redraw)
|
||||||
|
printf("\n");
|
||||||
|
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
|
|
||||||
alarm(1);
|
alarm(1);
|
||||||
|
|||||||
Reference in New Issue
Block a user