fix can byte order
This commit is contained in:
parent
2b31ef5c06
commit
4d513277b7
@ -146,13 +146,13 @@ void CAN_newMsg() {
|
||||
CAN_receive(&canMsg);
|
||||
data = canMsg.frame.id;
|
||||
data = data<<12;
|
||||
data = data | canMsg.frame.data0;
|
||||
data = data<<8;
|
||||
data = data | canMsg.frame.data1;
|
||||
data = data | canMsg.frame.data3;
|
||||
data = data<<8;
|
||||
data = data | canMsg.frame.data2;
|
||||
data = data<<8;
|
||||
data = data | canMsg.frame.data3;
|
||||
data = data | canMsg.frame.data1;
|
||||
data = data<<8;
|
||||
data = data | canMsg.frame.data0;
|
||||
POST(&CAN_myself, &CAN_processEvent, evCAnewMsg, 0, data);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user