Skip to content

Commit

Permalink
[HID] Fixup no report ID check
Browse files Browse the repository at this point in the history
  • Loading branch information
darthcloud committed Oct 30, 2023
1 parent fdc9044 commit a1c7fc3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions main/adapter/hid_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ void hid_parser(struct bt_data *bt_data, uint8_t *data, uint32_t len) {
uint8_t *end = data + len;
uint8_t *desc = data;
uint8_t report_id = 0;
uint8_t report_cnt = 0;
uint8_t tag_idx = 0;
uint32_t report_bit_offset[HID_TAG_CNT] = {0};
uint32_t report_usage_idx[HID_TAG_CNT] = {0};
Expand Down Expand Up @@ -494,7 +493,7 @@ void hid_parser(struct bt_data *bt_data, uint8_t *data, uint32_t len) {
return;
}
}
if (report_cnt == 0 && wip_report[HID_IN]->id == 0) {
if (report_idx == 0 && wip_report[HID_IN]->id == 0) {
report_id = 1;
wip_report[HID_IN]->id = 1;
wip_report[HID_OUT]->id = 1;
Expand Down

0 comments on commit a1c7fc3

Please sign in to comment.