Skip to content

Commit

Permalink
parser : more accurate fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Marije Baalman committed Sep 24, 2013
1 parent 3af58ad commit dcb163b
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions hidapi_parser/hidapi_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@ int hid_parse_report_descriptor( char* descr_buf, int size, struct hid_device_de
break;
case HID_USAGE:
current_usage = next_val;
current_usage_min = -1;
current_usage_max = -1;
current_usages[ current_usage_index ] = next_val;
#ifdef DEBUG_PARSER
printf("usage: 0x%02hhx, %i", current_usages[ current_usage_index ], current_usage_index );
Expand Down Expand Up @@ -371,8 +373,8 @@ int hid_parse_report_descriptor( char* descr_buf, int size, struct hid_device_de
descriptor->num_elements++;
prev_element = new_element;
}
current_usage_min = -1;
current_usage_max = -1;
// current_usage_min = -1;
// current_usage_max = -1;
current_usage_index = 0;
// current_physical_min = 0;
// current_physical_max = 0;
Expand Down Expand Up @@ -423,8 +425,8 @@ int hid_parse_report_descriptor( char* descr_buf, int size, struct hid_device_de
descriptor->num_elements++;
prev_element = new_element;
}
current_usage_min = -1;
current_usage_max = -1;
// current_usage_min = -1;
// current_usage_max = -1;
current_usage_index = 0;
// current_physical_min = 0;
// current_physical_max = 0;
Expand Down Expand Up @@ -475,8 +477,8 @@ int hid_parse_report_descriptor( char* descr_buf, int size, struct hid_device_de
descriptor->num_elements++;
prev_element = new_element;
}
current_usage_min = -1;
current_usage_max = -1;
// current_usage_min = -1;
// current_usage_max = -1;
current_usage_index = 0;
// current_physical_min = 0;
// current_physical_max = 0;
Expand Down

0 comments on commit dcb163b

Please sign in to comment.