File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -280,9 +280,9 @@ int CANClass::parsePacket()
280280
281281 _rxExtended = (readRegister (REG_RXBnSIDL (n)) & FLAG_IDE) ? true : false ;
282282
283- uint32_t idA = (readRegister (REG_RXBnSIDH (n)) << 3 ) | ((readRegister (REG_RXBnSIDL (n)) >> 5 ) & 0x07 );
283+ uint32_t idA = (( readRegister (REG_RXBnSIDH (n)) << 3 ) & 0xf8 ) | ((readRegister (REG_RXBnSIDL (n)) >> 5 ) & 0x07 );
284284 if (_rxExtended) {
285- uint32_t idB = ((uint32_t )(readRegister (REG_RXBnSIDL (n)) & 0x03 ) << 16 ) | (readRegister (REG_RXBnEID8 (n)) << 8 ) | readRegister (REG_RXBnEID0 (n));
285+ uint32_t idB = ((( uint32_t )(readRegister (REG_RXBnSIDL (n)) & 0x03 ) << 16 ) & 0x30000 ) | (( readRegister (REG_RXBnEID8 (n)) << 8 ) & 0xff00 ) | readRegister (REG_RXBnEID0 (n));
286286
287287 _rxId = (idA << 18 ) | idB;
288288 _rxRtr = (readRegister (REG_RXBnDLC (n)) & FLAG_RTR) ? true : false ;
You can’t perform that action at this time.
0 commit comments