Hi evryone... newbie here.
ive used the || if (msg.id == 0x01) || within the || if (can2.read(msg1)) ||. That is if only 1 message that we want to filter.
how about when we want to filter multiple message ids?
I know this is rather old topic, but I am facing problems while filtering IDs.
The way I am currently doing is using a switch case structure to select the messages I want to read and to save the data in the appropriate variables, however whenever I try filtering a big number of IDs I start noticing a loss of data.
I am using an ST board to communicate with a motor controller which is programmed to send certain data, such as speed, torque and temperatures, but I noticed the variables where the parameters are stored are updating very slowly. I imagined it has something to do with buffers not being cleared in time.
Can anyone explain this?
Whats the proper way to filter multiple IDs without losing data?
Hi,
With reference to CAN bus example code in http://mbed.org/handbook/CAN, I am trying to modify the code in order to receive a message with specific ID.
The follwoing read CAN function: "can1.read(msg)" receives any message, and I want to specify the message ID that it can receive.
Any advise?
Thanks in advance