fix CAN filters

This commit is contained in:
2023-08-25 09:06:54 +02:00
parent 2b91ec2df0
commit 3f1e4c84f0
4 changed files with 72 additions and 58 deletions

View File

@ -85,9 +85,9 @@ bool CAN_processEvent(Event* ev) {
// Send a message
if (ev->id == evCAsend) {
uCAN_MSG canMsg;
canMsg.frame.idType = 0; // I don't understand what is it
canMsg.frame.dlc = 4; // 4 bytes to send
canMsg.frame.rtr = 0; // no remote frame
canMsg.frame.idType = dSTANDARD_CAN_MSG_ID_2_0B; // standard
canMsg.frame.dlc = 4; // 4 bytes to send
canMsg.frame.rtr = 0; // no remote frame
canMsg.frame.data3 = (uint8_t) data;
data = data >> 8;
canMsg.frame.data2 = (uint8_t) data;