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
I was wondering if it would be possible to connect asynchronously with the controller at any time while the main program is already running, and let the robot check whether the controller is connected and behave differently when it is (remote-controlled) or not (autonomous).
What I think would be helpful is if the XboxController constructor took an auto_connect parameter. So you could create XboxController(auto_connect=False), and then later you could call an (async) connect method. When the controller isn't connected then it should behave as if the joysticks are centered and nothing is pressed.
That way you could write code for menus, for example, that could use either the controller or the hub buttons to control the robot. With just a connection timeout parameter, I think we'd have to create a wrapper class around the controller instead of using it directly.
It seems like an auto_connect parameter and connect method might also work well with the block coding.
Originally posted by @DanieleBenedettelli in #1598
The text was updated successfully, but these errors were encountered: