nightmode / logitech-g29

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

Force feedback in game doesn't work #25

Closed Jacksco007 closed 6 months ago

Jacksco007 commented 7 months ago

I discovered this code today and was trying to figure out how it works so I could use it instead of GHUB. I read the API documentation and saw disconnect() which is used to make the code work with other programs and games so I tried to make this simple program but on Assetto Corsa the force feedback doesn't work

const g = require('../code/index.js')

g.connect(function(err) {
  console.log('Ready')
  g.disconnect()
  console.log('Disconnected')
})
nightmode commented 7 months ago

This library is intended to be used with JavaScript but not simultaneously with other software. As long as Windows knows you have a Logitech wheel system (which is why you may need to install Logitech G HUB or some other drivers), then your video game is the software that should be exclusively talking to your wheel while you are playing.

I do not think this library will help Assetto Corsa, unless for some reason you wanted to run the wheel initialization routine where it spins around and tests itself, then exit this library, then run your game. I would think Windows or Assetto Corsa would trigger the wheel initialization routine though, again making this library not useful for games that talk directly to wheel systems.

Jacksco007 commented 6 months ago

So what's the function of this code?

nightmode commented 6 months ago

This library is for reading events like button pushes, wheel turn degrees, gear positions, gas pressure, and anything else on the wheel system into a JavaScript environment (Node.js) so you can do something else programatic with that data. You can also tell the wheel programmatically to do certain things like activate force in a certain direction.

Personally, my favorite use was having all my media player controls on macOS tied to the wheel system and controlling my music with various wheel turns, button presses, and gear changes. I also talked to people who were doing much more complex self driving cars with an extra logitech steering wheel in them, simulating what the real wheel was doing. Why, I'm not sure but it sure sounded cool!

Jacksco007 commented 6 months ago

I got it. Then I misunderstood the function of this library. Anyway, you did a great job. Thanks also for the support