This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch releases/12.11
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/releases/12.11 by this push:
new 628c05acf3e arch/sim/sim_canchar.c: fix CAN flags decoding for message
628c05acf3e is described below
commit 628c05acf3e37585551db8955dd7f06d2c298bef
Author: raiden00pl <[email protected]>
AuthorDate: Mon Sep 8 11:26:08 2025 +0200
arch/sim/sim_canchar.c: fix CAN flags decoding for message
fix CAN flags decoding for SIM CAN
Signed-off-by: raiden00pl <[email protected]>
---
arch/sim/src/sim/sim_canchar.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/arch/sim/src/sim/sim_canchar.c b/arch/sim/src/sim/sim_canchar.c
index 5101a91dddb..3e5e18ce82e 100644
--- a/arch/sim/src/sim/sim_canchar.c
+++ b/arch/sim/src/sim/sim_canchar.c
@@ -307,17 +307,17 @@ static void sim_can_work(void *arg)
hdr.ch_id = frame.can_id & CAN_ERR_MASK;
hdr.ch_dlc = can_bytes2dlc(frame.len);
- hdr.ch_rtr = frame.can_id & CAN_RTR_FLAG;
+ hdr.ch_rtr = (bool)(frame.can_id & CAN_RTR_FLAG);
#ifdef CONFIG_CAN_ERRORS
- hdr.ch_error = frame.can_id & CAN_ERR_FLAG;
+ hdr.ch_error = (bool)(frame.can_id & CAN_ERR_FLAG);
#endif
#ifdef CONFIG_CAN_EXTID
- hdr.ch_extid = frame.can_id & CAN_EFF_FLAG;
+ hdr.ch_extid = (bool)(frame.can_id & CAN_EFF_FLAG);
#endif
#ifdef CONFIG_CAN_FD
- hdr.ch_edl = frame.flags & CANFD_FDF;
- hdr.ch_brs = frame.flags & CANFD_BRS;
- hdr.ch_esi = frame.flags & CANFD_ESI;
+ hdr.ch_edl = (bool)(frame.flags & CANFD_FDF);
+ hdr.ch_brs = (bool)(frame.flags & CANFD_BRS);
+ hdr.ch_esi = (bool)(frame.flags & CANFD_ESI);
#endif
hdr.ch_tcf = 0;
#ifdef CONFIG_CAN_TIMESTAMP