From 6b46063eee805e0e680833da02fc16f15b92bf1e Mon Sep 17 00:00:00 2001 From: Oliver Hartkopp Date: Tue, 24 Jun 2025 19:48:14 +0200 Subject: [PATCH] cangen: add CAN XL RRS bit generation Allow to generate Remote Request Substitution bit content. Signed-off-by: Oliver Hartkopp --- cangen.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cangen.c b/cangen.c index 92290e6..95ac32d 100644 --- a/cangen.c +++ b/cangen.c @@ -987,12 +987,12 @@ int main(int argc, char **argv) rnd = random(); if (xl_flags_mode == MODE_RANDOM) { - cu.xl.flags = rnd & CANXL_SEC; + cu.xl.flags = rnd & (CANXL_SEC | CANXL_RRS); } else if (xl_flags_mode == MODE_FIX) { cu.xl.flags = xl_flags; } else if (xl_flags_mode == MODE_INCREMENT) { - xl_flags ^= CANXL_SEC; - cu.xl.flags = (xl_flags & CANXL_SEC); + xl_flags++; + cu.xl.flags = (xl_flags & (CANXL_SEC | CANXL_RRS)); } /* mark CAN XL frame */