nightmode / logitech-g29

Logitech G29 Racing Wheel for Node
Creative Commons Zero v1.0 Universal
104 stars 35 forks source link

No force feedback near deadzone #9

Closed leanidt closed 6 years ago

leanidt commented 6 years ago

Hello,

Would it be possible to add functionality that allows to set a force feedback near/at the deadzone (when a steering wheel is centered)? A good example of such feedback when it is present is right before a race start in Assetto Corsa, when a car is stationary. But usually the wheel has ~15 degree of play.

There are functions that are exposed through API that sound like they might help in setting it: LogiPlaySpringForce(), LogiPlayConstantForce(), and LogiStopDamperForce(). Can you implement something similar? Please let me know what you think.

Thank you, Leo

nightmode commented 6 years ago

Ooh where did you find information on calls like LogiPlaySpringForce(), LogiPlayConstantForce(), and LogiStopDamperForce()?

Currently you would need to detect the wheel position (easy) and turn on/off forceConstant and/or forceFriction yourself depending on how far the wheel moved away from center.

leanidt commented 6 years ago

Hi Daniel,

Those functions are described in documentation that comes as a part of steering wheel SDK. Attaching the file for your reference.

LogitechGamingSteeringWheelSDK.pdf

We tried to play with forceConstant and other force related functions and it did not produce any results, I think we did it incorrectly. Do you have an example of when/how they should be called?

Thanks, Leo

nightmode commented 6 years ago

Ah, so that SDK documentation doesn't apply to this library because this library uses node-hid to talk directly to the hardware. I don't know the magic commands used for advanced force feedback effects which is why there isn't many options currently. I'm sure the right person with the right knowledge could add 300% more options to this open source project but we'll just have to wait and hope someone like that finds the project.

To see the currently available force feedback options I would recommend going into the test folder wherever you installed the logitech-g29 library and then run node test-force.js. It is quite fun to use and if you see anything you like, you can copy the code from that file.

leanidt commented 6 years ago

Thanks for your advice Daniel, forceFriction was the effect from the game that I was describing.

nightmode commented 6 years ago

Excellent. You should be able to setup your code to detect the wheel position and adjust forceFriction to your liking. ^_^