cangen.c: fix formatting
parent
e03fd06abe
commit
4acc74cbcf
8
cangen.c
8
cangen.c
|
|
@ -441,6 +441,7 @@ int main(int argc, char **argv)
|
||||||
else
|
else
|
||||||
fprint_canframe(stdout, &frame, "\n", 1, maxdlen);
|
fprint_canframe(stdout, &frame, "\n", 1, maxdlen);
|
||||||
}
|
}
|
||||||
|
|
||||||
resend:
|
resend:
|
||||||
nbytes = write(s, &frame, mtu);
|
nbytes = write(s, &frame, mtu);
|
||||||
if (nbytes < 0) {
|
if (nbytes < 0) {
|
||||||
|
|
@ -466,11 +467,14 @@ resend:
|
||||||
fprintf(stderr, "write: incomplete CAN frame\n");
|
fprintf(stderr, "write: incomplete CAN frame\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
burst_sent_count++;
|
burst_sent_count++;
|
||||||
if (gap && burst_sent_count >= burst_count) /* gap == 0 => performance test :-] */
|
if (gap && burst_sent_count >= burst_count) /* gap == 0 => performance test :-] */
|
||||||
if (nanosleep(&ts, NULL)) return 1;
|
if (nanosleep(&ts, NULL))
|
||||||
|
return 1;
|
||||||
|
|
||||||
if(burst_sent_count >= burst_count) burst_sent_count = 0;
|
if (burst_sent_count >= burst_count)
|
||||||
|
burst_sent_count = 0;
|
||||||
|
|
||||||
if (id_mode == MODE_INCREMENT)
|
if (id_mode == MODE_INCREMENT)
|
||||||
frame.can_id++;
|
frame.can_id++;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue