Qtgamepad connections
-
Ubuntu 16.04, QT 5.9.1, I am using a Logitech gamepad, and am able to access everything about it satisfactorily except for the connection state. I have tried using the available signals:
connect(gamepad,SIGNAL(connectedChanged(bool)), this, SLOT(connectedChanged(bool)));
and the corresponding signal/slot mechanism in qgamepadmanager, and when I pull the gamepad out of the USB slot, I never get the isgnal until I am quitting the application.
In a slot triggered by a Qtimer, I query the connection state
if(gamepad->isConnected())
I always return true, whether or not the gamepad is pulled out or not.
Since I want to use the gamepad to control a robot, I am quite concerned with the state of the device--I want to secure all my actuators and take other corrective action if the gamepad is pulled out of the USB slot.
Is there something else I need to do? I find nothing else in the QT documentation referring to timeouts or anything similar.
Thanks in advance for any help -
Ubuntu 16.04, QT 5.9.1, I am using a Logitech gamepad, and am able to access everything about it satisfactorily except for the connection state. I have tried using the available signals:
connect(gamepad,SIGNAL(connectedChanged(bool)), this, SLOT(connectedChanged(bool)));
and the corresponding signal/slot mechanism in qgamepadmanager, and when I pull the gamepad out of the USB slot, I never get the isgnal until I am quitting the application.
In a slot triggered by a Qtimer, I query the connection state
if(gamepad->isConnected())
I always return true, whether or not the gamepad is pulled out or not.
Since I want to use the gamepad to control a robot, I am quite concerned with the state of the device--I want to secure all my actuators and take other corrective action if the gamepad is pulled out of the USB slot.
Is there something else I need to do? I find nothing else in the QT documentation referring to timeouts or anything similar.
Thanks in advance for any help