dualsense-controller-python icon indicating copy to clipboard operation
dualsense-controller-python copied to clipboard

Delay on slow CPU

Open fab1an opened this issue 1 year ago • 4 comments

There's a large delay on my raspberrypi-zero.

When pressing a button it takes about a second to register with my python-script.

Is there some kind of busy-cpu loop that is blocking the CPU? could this be worked around to be event-driven?

fab1an avatar Mar 29 '24 05:03 fab1an

Interesting. We've never tried this lib on slow CPU machines. There is a separate thread, which polls the incoming HID data bytes, then it detect changes of values like button up or down, and then, on change, it executes your callback. is your callback doing hard work which blocks execution?

einspunktnull avatar Apr 01 '24 08:04 einspunktnull

No, it is just printing debug-information.

fab1an avatar Apr 01 '24 08:04 fab1an

Unfortunately i can't test with your setup right now to find out if it's a general problem with python on slow CPU devices or if it's a problem with this library itself. Maybe you could help me by trying the pydualsense library from flok and let me know if it runs better with it. the core structure is very similar. this could provide us with valuable conclusions and give us a starting point for further problem analysis.

einspunktnull avatar Apr 01 '24 08:04 einspunktnull

have you tried flok's library? do you have any insights you can share?

einspunktnull avatar Jun 17 '24 18:06 einspunktnull