Ryochan7 / sc-controller

User-mode driver and GTK3 based GUI for Steam Controller
GNU General Public License v2.0
175 stars 23 forks source link

[TODO] Fix haptics data for Steam Controller #94

Open Ryochan7 opened 1 year ago

Ryochan7 commented 1 year ago

Lately I have been wanting to implement haptic feedback for actions in my C# mapper. As a consequence, I ended up finding a problem with how the haptic data is sent to the controller which also affects SC Controller; this still affects the upstream Kozec repo as well. Based on my testing, it looks like signal amplitude and period are actually swapped in the current haptic routine. This problem also affects SteamControllerSinger as it looks like a change in output frequency will also change the amplitude used.

Going to have to check sending haptic packets to the Steam Controller in SC Controller. I will probably have to change the rumble routine as well. Maybe something better can be made although I like the current rumble routine more than what Steam Input offers for emulated rumble.

Ryochan7 commented 1 year ago

Looks like I was somewhat mistaken. The current bytes used to specify the period are valid. The bytes for amplitude are a bit suspect still. They also seem to control phase offsets or something else as the actual intensity will oscillate as the value increases. The time the haptics are active also seems to start to increase despite leaving the period and number of clicks the same.