Skip to content

Conversation

@twam
Copy link
Contributor

@twam twam commented Feb 19, 2022

Fix creation of EndpointDescriptor and add unit tests for both possible
lengths.

Fix creation of EndpointDescriptor and add unit tests for both possible
lengths.
@twam twam force-pushed the endpoint-descriptor branch from f16173f to 9c9c12a Compare February 19, 2022 17:11
@antoinevg antoinevg self-requested a review April 15, 2024 09:32
@antoinevg
Copy link
Member

Your PR is failing the test_descriptor_collection unit test:

got:      [9, 2, 32, 0, 1, 1, 0, 128, 250, 9, 4, 1, 0, 2, 255, 255, 255, 0, 9, 5, 129, 2, 64, 0, 255, 9, 5, 1, 2, 64, 0, 255] 
expected: [9, 2, 32, 0, 1, 1, 0, 128, 250, 9, 4, 1, 0, 2, 255, 255, 255, 0, 7, 5, 129, 2, 64, 0, 255, 7, 5, 1, 2, 64, 0, 255] 

# Configuration descriptor, with subordinates.

Your approach works when creating the descriptor using EndpointDescriptor.build() but using the context manager syntax with i.EndpointDescriptor() as e: the descriptor's bLength field will be set to 9 even when the optional fields aren't specified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants