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

[Feature] Add a method to disconnect Xbox Controller #1663

Open
PoweredUP-AC opened this issue Jun 3, 2024 · 2 comments
Open

[Feature] Add a method to disconnect Xbox Controller #1663

PoweredUP-AC opened this issue Jun 3, 2024 · 2 comments
Labels
enhancement New feature or request topic: remote control Issues related to remotly controlling hubs

Comments

@PoweredUP-AC
Copy link

Is your feature request related to a problem? Please describe.
I wanted to make the hub and the Xbox controller shut down whenever the Xbox logo button is pressed. I assumed that hub.system.shutdown() would lead to controller being turned off the same way it does when the program ends, but it stays in pairing mode instead.

Describe the solution you'd like
As disconnecting a controller with a dedicated method might be useful in some scenarios, I think that adding something like xbox.disconnect() is the correct way to do it.(there must be a better name though) This function should disconnect the conroller from the hub and turn it off (described above).
It seems to me that this function needs to be called on system.shutdown(), too.

@PoweredUP-AC PoweredUP-AC added enhancement New feature or request triage Issues that have not been triaged yet labels Jun 3, 2024
@laurensvalk
Copy link
Member

Does the controller eventually turn off though?

As an alternative, you could perhaps end the program (raise SystemExit) instead of shutting the hub down. This should lead to a normal disconnect and the hub will automatically power off in a few minutes.

I assumed that hub.system.shutdown() would lead to controller being turned off the same way it does when the program ends

I would have assumed that too.

@laurensvalk laurensvalk added topic: remote control Issues related to remotly controlling hubs and removed triage Issues that have not been triaged yet labels Jun 4, 2024
@PoweredUP-AC
Copy link
Author

Xbox controller turns off by itself after some inbuilt cooldown, but it doesn't seem like a valid solution for this task. If the proposed method is not an easy thing to implement, I'd rather close this issue because of its minor importance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request topic: remote control Issues related to remotly controlling hubs
Projects
None yet
Development

No branches or pull requests

2 participants