Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linux: fix service and characteristic order #162

Merged
merged 2 commits into from
May 7, 2023

Conversation

aykevl
Copy link
Member

@aykevl aykevl commented May 4, 2023

This should fix #135 on Linux.
It looks like there is still a bug with DiscoverServices on both Linux and macOS (it doesn't respect the order of UUIDs given in the parameter), this should still be fixed in a separate PR.

aykevl added 2 commits May 4, 2023 21:26
This is very much like #161,
but for Linux instead. In fact, I've copied the structure of the code
because it works for macOS.

I have tested that the scan order is now as requested. I also verified
that multiple characteristics with the same UUID are now supported, but
support is still a bit buggy: they appear in a random order (due to Go
map iteration order). I will fix this in the next commit.
Previously the list of services and characteristics wasn't sorted, and
because of the way Go maps work they were in fact randomized.
This commit fixes the sorting for services and characteristics, which
both suffered from the same lack of sorting.

This fixes #135.
@deadprogram
Copy link
Member

Thank you for the fixes @aykevl now merging.

@deadprogram deadprogram merged commit 8260f2f into dev May 7, 2023
2 checks passed
@deadprogram deadprogram deleted the linux-fix-characteristic-order branch May 7, 2023 10:38
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.

None yet

2 participants