flok / pydualsense

control your dualsense controller with python
MIT License
112 stars 33 forks source link

Is it possible to send input state on writeReport ? #21

Closed sonizef closed 3 years ago

sonizef commented 3 years ago

Hi !

Is not an issue but I don't where I can ask my question :)

  1. Is it possible to get the current state of the controller and to send it to controller ? It's not very clear, but I read my device with that

inReport = dualsense.device.read(dualsense.receive_buffer_size)

And if I immediately send these data to my controller with that

dualsense.device.write(inReport)

It's not working properly.

  1. Is it possible to send an input state ? For exemple : What I need to write on my device if I want to simulate a click on my Square button ? I think it's linked with my first question.

Thank you for your work!

flok commented 3 years ago

Sending input states to the controller is not supported. You can only send a feature report to it that changes settings like the triggers / lights.

sonizef commented 3 years ago

Is because pydualsense not supported this feature for now or is beacause hidapi not supported that?

My dualsense is detected like dualshock4 on my mac, and I think the dualshock 4 can receive input?

Thank you! :)

flok commented 3 years ago

The hidapi doesnt support to simulate input of the controller.

If you want the state of the controller its in the .state variable in the pydualsense class. See the examples folder for code