mirror of
https://github.com/linux-can/can-utils.git
synced 2026-09-20 14:29:55 +02:00
cangen: add missing long CAN frame view for len8_dlc and eff
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
This commit is contained in:
@@ -453,6 +453,7 @@ int main(int argc, char **argv)
|
|||||||
unsigned char verbose = 0;
|
unsigned char verbose = 0;
|
||||||
unsigned char rtr_frame = 0;
|
unsigned char rtr_frame = 0;
|
||||||
unsigned char len8_dlc = 0;
|
unsigned char len8_dlc = 0;
|
||||||
|
unsigned char view = 0;
|
||||||
int count = 0;
|
int count = 0;
|
||||||
unsigned long burst_sent_count = 0;
|
unsigned long burst_sent_count = 0;
|
||||||
int mtu, maxdlen;
|
int mtu, maxdlen;
|
||||||
@@ -515,6 +516,7 @@ int main(int argc, char **argv)
|
|||||||
break;
|
break;
|
||||||
case 'e':
|
case 'e':
|
||||||
extended = 1;
|
extended = 1;
|
||||||
|
view |= CANLIB_VIEW_INDENT_SFF;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'f':
|
case 'f':
|
||||||
@@ -537,11 +539,13 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
case '8':
|
case '8':
|
||||||
len8_dlc = 1;
|
len8_dlc = 1;
|
||||||
|
view |= CANLIB_VIEW_LEN8_DLC;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'm':
|
case 'm':
|
||||||
mix = 1;
|
mix = 1;
|
||||||
canfd = 1; /* to switch the socket into CAN FD mode */
|
canfd = 1; /* to switch the socket into CAN FD mode */
|
||||||
|
view |= CANLIB_VIEW_INDENT_SFF;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'I':
|
case 'I':
|
||||||
@@ -626,6 +630,9 @@ int main(int argc, char **argv)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (verbose > 2)
|
||||||
|
view |= CANLIB_VIEW_ASCII;
|
||||||
|
|
||||||
ts_gap = double_to_timespec(gap / 1000);
|
ts_gap = double_to_timespec(gap / 1000);
|
||||||
|
|
||||||
/* recognize obviously missing commandline option */
|
/* recognize obviously missing commandline option */
|
||||||
@@ -829,11 +836,10 @@ int main(int argc, char **argv)
|
|||||||
if (verbose) {
|
if (verbose) {
|
||||||
static char afrbuf[AFRSZ]; /* ASCII CAN frame buffer size */
|
static char afrbuf[AFRSZ]; /* ASCII CAN frame buffer size */
|
||||||
|
|
||||||
|
|
||||||
printf(" %s ", argv[optind]);
|
printf(" %s ", argv[optind]);
|
||||||
|
|
||||||
if (verbose > 1)
|
if (verbose > 1)
|
||||||
sprint_long_canframe(afrbuf, &cu, (verbose > 2) ? CANLIB_VIEW_ASCII : 0);
|
sprint_long_canframe(afrbuf, &cu, view);
|
||||||
else
|
else
|
||||||
sprint_canframe(afrbuf, &cu, 1);
|
sprint_canframe(afrbuf, &cu, 1);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user