mirror of
https://github.com/linux-can/can-utils.git
synced 2026-08-05 06:20:00 +02:00
Merge pull request #122 from olerem/test
testj1939: split output string in to 8 byte strings
This commit is contained in:
+8
-1
@@ -259,12 +259,19 @@ int main(int argc, char *argv[])
|
||||
error(1, errno, "sendto");
|
||||
}
|
||||
if (todo_recv) {
|
||||
int i = 0;
|
||||
|
||||
if (todo_names && peername.can_addr.j1939.name)
|
||||
printf("%016llx ", peername.can_addr.j1939.name);
|
||||
printf("%02x %05x:", peername.can_addr.j1939.addr,
|
||||
peername.can_addr.j1939.pgn);
|
||||
for (j = 0; j < ret; ++j)
|
||||
for (j = 0; j < ret; ++j, i++) {
|
||||
if (i == 8) {
|
||||
printf("\n%05x ", j);
|
||||
i = 0;
|
||||
}
|
||||
printf(" %02x", dat[j]);
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user