Skip to content

Commit

Permalink
Merge pull request #38 from REVrobotics/fix/rtr-mask
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahAndrews authored Oct 2, 2024
2 parents 77162c1 + dbfe43a commit 2ec4c6c
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,10 @@ class CandleWinUSBDeviceThread :public DriverDeviceThread {
candle_frame_t frame;
frame.can_dlc = el.m_msg.GetSize();

uint32_t messageId = el.m_msg.GetMessageId() & NON_RESERVED_ARB_ID_MASK;

bool isExtended = true; // FRC CAN is always extended
bool isRtr = messageId & HAL_CAN_IS_FRAME_REMOTE;
bool isRtr = el.m_msg.GetMessageId() & HAL_CAN_IS_FRAME_REMOTE;

uint32_t messageId = el.m_msg.GetMessageId() & NON_RESERVED_ARB_ID_MASK;

frame.can_id = messageId;
if(isExtended) {
Expand Down

0 comments on commit 2ec4c6c

Please sign in to comment.