Skip to content

Commit

Permalink
canbusload: redraw mode: use less screen estate
Browse files Browse the repository at this point in the history
Use less screen estate by not printing unneeded newlines in redraw
mode.
  • Loading branch information
marckleinebudde committed Sep 27, 2023
1 parent 92adbda commit 84919ed
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions canbusload.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,15 +223,18 @@ void printstats(int signo)
if (color)
printf("%s", ATTRESET);

printf("\n");
if (!redraw || (i < currmax - 1))
printf("\n");

stat[i].recv_frames = 0;
stat[i].recv_bits_total = 0;
stat[i].recv_bits_dbitrate = 0;
stat[i].recv_bits_payload = 0;
}

printf("\n");
if (!redraw)
printf("\n");

fflush(stdout);

alarm(1);
Expand Down

0 comments on commit 84919ed

Please sign in to comment.