From 373b237be97567614774bea44475270fd11d3447 Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Wed, 27 Jun 2012 00:06:23 -0600 Subject: [PATCH] Make more generic to try and work on mk2 --- hdjd.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/hdjd.c b/hdjd.c index 6ab8c9e..f22f537 100644 --- a/hdjd.c +++ b/hdjd.c @@ -35,7 +35,7 @@ main(int argc, char **argv) } while (1) { - uint8_t data[12]; + uint8_t data[80]; int transferred; int i; @@ -45,15 +45,10 @@ main(int argc, char **argv) break; } - if (transferred % 3 > 0) { - fprintf(stderr, "WARNING: ignoring packet of length %d\n", - transferred); - continue; - } - - for (i = 0; i < transferred; i += 3) { - printf("%02x %02x %02x\n", data[i], data[i + 1], data[i + 2]); + for (i = 0; i < transferred; i += 1) { + printf("%02x ", data[i]); } + printf("\n"); } if (ret < 0) {