You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So it would be good to have a simple cross platform method for determining if the current controller is still connected to the machine. To the best of my knowledge such a thing does not currently exist. Disconnected can mean a bunch of different things, so I'll enumerate the ones I know of:
Controller out of bluetooth 'sight' (out of range, or shielded)
Controller turned off manually or out of battery
Controller unresponsive (broken)
I didn't find a concrete way of implementing it that was reliable on both OSX and Linux. The Current implementation of controller disconnection in Sportsfriends looks something like this:
So, to explain what is going on, for a controller to be seen as connected we must check:
We have a valid move api handle for controller.
We are able to successfully call psmove_update_leds on controller.
We have successfully pulled input data from the controller within the last second.
Anything shy of those requirements doesn't seem to be robust enough.
This is of course a fair bit of a faff to go through, and as far as I can see these are all things that we might be able to handle on the api side. Thoughts?
The text was updated successfully, but these errors were encountered:
Being able to read data from the controller, especially as it comes in with a high frequency, should be good. Maybe it also needs some holddown timer, i.e. if within 1 second, mark as "questionable", after 4 seconds (when the LEDs would go off) mark as "disconnected".
So it would be good to have a simple cross platform method for determining if the current controller is still connected to the machine. To the best of my knowledge such a thing does not currently exist. Disconnected can mean a bunch of different things, so I'll enumerate the ones I know of:
I didn't find a concrete way of implementing it that was reliable on both OSX and Linux. The Current implementation of controller disconnection in Sportsfriends looks something like this:
So, to explain what is going on, for a controller to be seen as connected we must check:
Anything shy of those requirements doesn't seem to be robust enough.
This is of course a fair bit of a faff to go through, and as far as I can see these are all things that we might be able to handle on the api side. Thoughts?
The text was updated successfully, but these errors were encountered: