forked from test34/can_wizard
finished matches_filters logic
This commit is contained in:
parent
d6f6a2f4d5
commit
bfb8465657
1 changed files with 10 additions and 1 deletions
|
@ -73,7 +73,16 @@ void can_msg_to_str(twai_message_t *can_msg, char *start_str, char *out_str) {
|
|||
}
|
||||
|
||||
bool matches_filters(twai_message_t *msg) {
|
||||
List *tmp_cursor = adv_filters.filters;
|
||||
while (tmp_cursor != NULL) {
|
||||
smart_filt_element_t *curr_filter;
|
||||
curr_filter = (smart_filt_element_t *) tmp_cursor->data;
|
||||
if ((msg->identifier & curr_filter->mask) == curr_filter->filt) {
|
||||
return true;
|
||||
}
|
||||
tmp_cursor = tmp_cursor->next;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// TODO: add software filtering
|
||||
|
|
Loading…
Reference in a new issue