System repeats last message infinitely upon joystick disconnect

asked 2019-11-06 17:44:00 -0500

jdolds09 gravatar image

What is the best way to handle if your input device disconnects using joy? If we are telling our system to go forward and the controller disconnects the system will keep going forward forever. We do not want to use a deadman button, we are using a toggled deadman button where if you press the pause button on the xbox controller the system will not accept any input until you press the pause button again. Also autorepeat won't help us. Are there any Joy functions that detect an input device disconnection or is there anyway we could do a try catch and catch the error thrown when an input device is disconnected?

edit retag flag offensive close merge delete