fix CAN id message

I'm fucking dump
This commit is contained in:
Rémi Heredero 2023-08-25 10:32:28 +02:00
parent c2a399d15c
commit 478b4f2ff9

View File

@ -74,9 +74,13 @@ bool CAN_processEvent(Event* ev) {
CAN_4_BYTES tmpData; CAN_4_BYTES tmpData;
tmpData.full.bytes = data; tmpData.full.bytes = data;
uint8_t idMsg = 0x0F && (tmpData.separate.byte0>>4); uint8_t idMsg = tmpData.separate.byte0;
uint8_t idRecipient = 0x0F && tmpData.separate.byte1; idMsg = idMsg >> 4;
uint8_t idSender = (tmpData.separate.byte1>>4); idMsg = idMsg & 0xF;
uint8_t idRecipient = tmpData.separate.byte1;
idRecipient = idRecipient & 0xF;
uint8_t idSender = tmpData.separate.byte1;
idSender = idSender >> 4;
me->receiveCan(idSender, idMsg, canData); me->receiveCan(idSender, idMsg, canData);
} }