berarma / new-lg4ff

Experimental Logitech force feedback module for Linux
GNU General Public License v2.0
298 stars 18 forks source link

[question] steering control? #79

Closed CarlDegio closed 11 months ago

CarlDegio commented 1 year ago

In the game of Horizon 5, I found that the steering wheel sometimes turned itself due to the terrain.

I want to reproduce this behavior using the code for autodrive by G923 (make the steering wheel follow the front wheels of the car). But I found that the SDK provided here seems to only make the steering wheel return to the center with different stiffnesses.

Is there some API that can directly control the angle of the steering wheel or apply torque?

CarlDegio commented 1 year ago

https://github.com/nightmode/logitech-g29/issues/2 would be a reference method

berarma commented 1 year ago

If I've understood correctly, you could use a FF_SPRING effect with the center parameter set where you want it.

CarlDegio commented 1 year ago

Thank you! This might be helpful. At the same time, I would like to ask how to adjust the FF? I saw in the project introduction to modify the files in /sys/bus/hid/drivers/logitech/XXXX:XXXX:XXXX.XXXX/ to adjust the behavior. I don't quite understand how to adjust FF_SPRING

CarlDegio commented 1 year ago

I found this, it works: https://github.com/gvalkov/python-evdev/issues/122

Thanks again!