finished matches_filters logic

This commit is contained in:
Данила Горнушко 2023-11-29 14:27:22 +03:00
parent d6f6a2f4d5
commit bfb8465657

View file

@ -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) {
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
void can_task(void* arg) {