Merge pull request #240 from marckleinebudde/canfdtest

canfdtest: remove trailing whitespace and print RX'ed frame in case of RX before TX
pull/241/head
Marc Kleine-Budde 2020-09-24 11:27:10 +02:00 committed by GitHub
commit e1f75da433
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -203,7 +203,7 @@ static int check_frame(const struct can_frame *frame)
{
int err = 0;
int i;
if (frame->can_id != CAN_MSG_ID) {
printf("unexpected Message ID 0x%04x!\n", frame->can_id);
err = -1;
@ -213,7 +213,7 @@ static int check_frame(const struct can_frame *frame)
printf("unexpected Message length %d!\n", frame->can_dlc);
err = -1;
}
for (i = 1; i < frame->can_dlc; i++) {
if (frame->data[i] != (uint8_t)(frame->data[i-1] + 1)) {
printf("Frame inconsistent!\n");
@ -335,6 +335,7 @@ static int can_echo_gen(void)
} else {
if (!recv_tx[recv_rx_pos]) {
printf("RX before TX!\n");
print_frame(&rx_frame, 0);
running = 0;
}
/* compare with expected */