Skip to content

Commit 6b46063

Browse files
committed
cangen: add CAN XL RRS bit generation
Allow to generate Remote Request Substitution bit content. Signed-off-by: Oliver Hartkopp <[email protected]>
1 parent 93a7b2d commit 6b46063

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cangen.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -987,12 +987,12 @@ int main(int argc, char **argv)
987987
rnd = random();
988988

989989
if (xl_flags_mode == MODE_RANDOM) {
990-
cu.xl.flags = rnd & CANXL_SEC;
990+
cu.xl.flags = rnd & (CANXL_SEC | CANXL_RRS);
991991
} else if (xl_flags_mode == MODE_FIX) {
992992
cu.xl.flags = xl_flags;
993993
} else if (xl_flags_mode == MODE_INCREMENT) {
994-
xl_flags ^= CANXL_SEC;
995-
cu.xl.flags = (xl_flags & CANXL_SEC);
994+
xl_flags++;
995+
cu.xl.flags = (xl_flags & (CANXL_SEC | CANXL_RRS));
996996
}
997997

998998
/* mark CAN XL frame */

0 commit comments

Comments
 (0)