Open laurensvalk opened 2 months ago
What I think would be helpful is if the XboxController constructor took an
auto_connect
parameter. So you could createXboxController(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 andconnect
method might also work well with the block coding.
Originally posted by @dsplaisted in https://github.com/pybricks/support/discussions/1598#discussioncomment-9166479
This would also be nice to have for the upcoming builtin "port view" or "port control" application discussed in https://github.com/pybricks/support/issues/139
Then we can have it scan for remotes, but also allow you to operate it without a remote.
We can make make this optional, and make it use the current behavior as the default so that it isn't a breaking change.
Originally posted by @DanieleBenedettelli in https://github.com/pybricks/support/discussions/1598