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

Multiple device support #382

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

nicola02nb
Copy link
Contributor

@nicola02nb nicola02nb commented Dec 4, 2024

Changes made

Added multiple device support with command arg -d, --device INDEX
Actions can be executed only to one device at a time

Checklist

  • I adjusted the README (if needed)
  • For new features in HeadsetControl: I discussed it beforehand in Issues or Discussions and adhered to the wiki

@Sapd
Copy link
Owner

Sapd commented Dec 8, 2024

Thank you!

Some points for now:

  • --test-device seems to be completely broken
    • In the end I think it would be nice that also the test device is shown as another device (when the parameter is provided) together with a real device when one its connected
  • -d should be I think a bit more flexible. It should also support -d vendorid:deviceid (like in the --dev menu). However I like the approach with showing the indexes directly in the text when running the program

@nicola02nb
Copy link
Contributor Author

  • --test-device seems to be completely broken

Ok, didn't checked that...

  • In the end I think it would be nice that also the test device is shown as another device (when the parameter is provided) together with a real device when one its connected

You mean to add it to the curernt list of connected devices?

  • -d should be I think a bit more flexible. It should also support -d vendorid:deviceid (like in the --dev menu). However I like the approach with showing the indexes directly in the text when running the program

Maybe an hybrid solution where you can use both of them would be also better...

Question: Which interface I choose to interact with a device changes nothing, right?

@Sapd
Copy link
Owner

Sapd commented Dec 8, 2024

Maybe an hybrid solution where you can use both of them would be also better...

Yes thats what I mean. That both -d index and -d vendorid:deviceid works. There is already a function for that, it just has to be moved to utility.c and modified in a way that also one id works:

static int get_two_ids(char* input, int* id1, int* id2)

You mean to add it to the curernt list of connected devices?

Yes, when the parameter is provided.

Question: Which interface I choose to interact with a device changes nothing, right?

Basically there is no sense in choosing the interface, its already given by the device implementation

@nicola02nb
Copy link
Contributor Author

nicola02nb commented Dec 8, 2024

Running tests locally gives no errors.
I'm wonderig why CI does...

@nicola02nb
Copy link
Contributor Author

nicola02nb commented Dec 8, 2024

Now it should be all done

it just has to be moved to utility.c and modified in a way that also one id works

Missed that...

@nicola02nb nicola02nb force-pushed the multiple-device-support branch 3 times, most recently from 0a7fb6c to dea163b Compare December 10, 2024 14:06
@nicola02nb nicola02nb force-pushed the multiple-device-support branch from dea163b to 855b7df Compare December 10, 2024 15:17
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