Coping with gamepad sleep function.

9 views
Skip to first unread message

Asterion Daedalus

unread,
Dec 5, 2017, 4:59:23 PM12/5/17
to kivy-...@googlegroups.com
I have a iPega PG 9077 gamepad that I intend to use in bluetooth mode for a robotics controller.  There will be automation onboard the robot so I am only going to use the gamepad intermittently.

I started with the joystick example and parred it back by removing the joy_motion function and just using print () as behaviour for all the callbacks.

Everything works as expected until I leave the gamepad to go to sleep.

There are two unwanted behaviours.

1) When I wake the gamepad with home button, the kivy program no longer reacts to activity on the gamepad.  I assume Kivy has dropped the gamepad.
2) After the gamepad has gone to sleep the Kivy program eventually self terminates.

What needs to happen in Kivy to detect the sleeping gamepad and to have it rebind to the gamepad automatically when the gamepad re-awakens?

What needs to happen in Kivy to stop the Kivy program quietly exiting if the gamepad goes to sleep?

I am running on Windoze 10 and using 64 bit Python 3.6.3  and Kivy 1.10.0.

Note I have run the pyGame joystick example with same game pad.  The gamepad can sleep/wake and the pyGame has no problem picking up the gamepad again as it re-awakens.

Cheers,
A




Reply all
Reply to author
Forward
0 new messages