Skip to content

Commit

Permalink
netspeed format update
Browse files Browse the repository at this point in the history
  • Loading branch information
NateLol committed Jul 1, 2020
1 parent 80f4dbf commit f95578e
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/Example_Code/example_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -493,25 +493,25 @@ void testnetspeed(int standalone)
if(standalone){
setTextSize(2);
setCursor(7,0);
if (in < 1000) sprintf(buf, "U:%d B/s", in);
else if (in > 1000000) sprintf(buf, "U:%.2f M/s", in/1000000.0);
else sprintf(buf, "U:%.2f K/s", in/1000.0);
if (in < 1000) sprintf(buf, "U:%dB/s", in);
else if (in > 1000000) sprintf(buf, "U:%.2fM/s", in/1000000.0);
else sprintf(buf, "U:%.2fK/s", in/1000.0);
print_strln(buf);
setCursor(7,16);
if (out < 1000) sprintf(buf, "D:%d B/s", out);
else if (out > 1000000) sprintf(buf, "D:%.2f M/s", out/1000000.0);
else sprintf(buf, "D:%.2f K/s", out/1000.0);
if (out < 1000) sprintf(buf, "D:%dB/s", out);
else if (out > 1000000) sprintf(buf, "D:%.2fM/s", out/1000000.0);
else sprintf(buf, "D:%.2fK/s", out/1000.0);
print_strln(buf);
}
else{
setTextSize(1);
if (in < 1000) sprintf(buf, "U:%d B/s,", in);
else if (in > 1000000) sprintf(buf, "U:%.2f M/s,", in/1000000.0);
else sprintf(buf, "U:%.2f K/s,", in/1000.0);
if (in < 1000) sprintf(buf, "U:%dB/s,", in);
else if (in > 1000000) sprintf(buf, "U:%.2fM/s,", in/1000000.0);
else sprintf(buf, "U:%.2fK/s,", in/1000.0);
print_str(buf);
if (out < 1000) sprintf(buf, "D:%d B/s", out);
else if (out > 1000000) sprintf(buf, "D:%.2f M/s", out/1000000.0);
else sprintf(buf, "D:%.2f K/s", out/1000.0);
if (out < 1000) sprintf(buf, "D:%dB/s", out);
else if (out > 1000000) sprintf(buf, "D:%.2fM/s", out/1000000.0);
else sprintf(buf, "D:%.2fK/s", out/1000.0);
print_str(buf);
}
}
Expand Down

0 comments on commit f95578e

Please sign in to comment.