X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=ao-tools%2Fao-sky-flash%2Fsky_serial.c;h=94b0b156502149e171f041258e50de764cc733ae;hp=4aeb14581801129c41593461d9e8058d2f71d408;hb=1085ec5d57e0ed5d132f2bbdac1a0b6a32c0ab4a;hpb=dd8b2eadab12965d232640449b1d1c9f2484238c diff --git a/ao-tools/ao-sky-flash/sky_serial.c b/ao-tools/ao-sky-flash/sky_serial.c index 4aeb1458..94b0b156 100644 --- a/ao-tools/ao-sky-flash/sky_serial.c +++ b/ao-tools/ao-sky-flash/sky_serial.c @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of @@ -103,16 +104,14 @@ skytraq_write(int fd, const char *data, int len) int r; int us; + skytraq_dbg_printf (0, "%4d: ", len); + if (len < 70) + skytraq_dbg_buf(0, data, len); while (len) { int this_time = len; if (this_time > 128) this_time = 128; - if (this_time < 70) { - skytraq_dbg_printf (0, "%4d: ", this_time); - skytraq_dbg_buf(0, data, this_time); - } else { - skytraq_dbg_printf (0, "%d bytes (%d remain)", this_time, len); - } + skytraq_dbg_printf(0, "."); fflush(stdout); r = write(fd, data, this_time); if (r <= 0)