You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been playing around with setting Masks and Filters. It took me a while to work out how to make it work correctly, but there is an omission in the code for setting the standard mask and filter.
The 'standard' frame mask and filter can be used to filter on ID and also the first 2 data bytes. Unfortunately the code in mcp_can.cpp doesn't allow for filtering on the data bytes, only on the ID. Here is the current code.
I was working on making an example sketch to demonstrate the mask and filtering abilities and stumbled upon this as well but I was not sure if anyone would really need to filter on the data bytes... Instead of calling the 'mcp2515_write_id' function, I was going to write a 'mcp2515_write_mf' function that would take advantage of the standard ID data bytes mask and filtering ability.
Filtering on data bytes is probably not needed when obtaining data from a vehicle system, but the can bus protocol is being used for all manner of things from industrial automation to model train sets. One node could send out several different packets of information, distinguished by a 'packet type' byte. Hence the need for filtering on the data bytes.
I have been playing around with setting Masks and Filters. It took me a while to work out how to make it work correctly, but there is an omission in the code for setting the standard mask and filter.
The 'standard' frame mask and filter can be used to filter on ID and also the first 2 data bytes. Unfortunately the code in mcp_can.cpp doesn't allow for filtering on the data bytes, only on the ID. Here is the current code.
I have gotten around this by modifying the code and adding ext=2. Here is my modified code
Can this fix be added to the code, or some similar modification be made?
The text was updated successfully, but these errors were encountered: