diff options
author | Keith Packard <keithp@keithp.com> | 2012-12-04 01:30:39 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2012-12-04 01:30:39 -0800 |
commit | d4d5d411679d074295d4722f4887fd1cf4f0906c (patch) | |
tree | 5032e1a009cfd2a0842c6fbc180ccc72a5a04f74 /ao-tools/ao-sky-flash/sky_serial.c | |
parent | 5f6b3790667d9b92370b4fe0dad5626929fea2ba (diff) |
ao-sky-flash: Clean up debug printfs a bit
This makes debugging output a bit cleaner
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'ao-tools/ao-sky-flash/sky_serial.c')
-rw-r--r-- | ao-tools/ao-sky-flash/sky_serial.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/ao-tools/ao-sky-flash/sky_serial.c b/ao-tools/ao-sky-flash/sky_serial.c index 4aeb1458..7230bf8c 100644 --- a/ao-tools/ao-sky-flash/sky_serial.c +++ b/ao-tools/ao-sky-flash/sky_serial.c @@ -103,16 +103,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) |