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,8 +73,17 @@ void can_msg_to_str(twai_message_t *can_msg, char *start_str, char *out_str) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool matches_filters(twai_message_t *msg) {
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
tmp_cursor = tmp_cursor->next;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: add software filtering
|
// TODO: add software filtering
|
||||||
void can_task(void* arg) {
|
void can_task(void* arg) {
|
||||||
|
|
Loading…
Reference in a new issue