Skip to content

bhy2_get_and_process_fifo does not work #2

@sullivanmj

Description

@sullivanmj

bhy2_get_and_process_fifo does not fire callbacks that were added with bhy2_register_fifo_parse_callback

The reason for this is that the callback is not properly retrieved in the get_callback_info function. There are bugs on lines 11381338 and 11391339 of bhy2.c. Instead of:

info->callback = NULL;
info->callback_ref = NULL;

those lines should be:

info->callback = dev->table[sensor_id].callback;
info->callback_ref = dev->table[sensor_id].callback_ref;

When this change is made, then callbacks that were registered with bhy2_register_fifo_parse_callback are called when the appropriate data is in the FIFO, when bhy2_get_and_process_fifo is called.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions