nicman23 / dkms-hid-nintendo

dkms-hid-nintendo
GNU General Public License v2.0
240 stars 43 forks source link

port hid-nintendo rumble reliability fixes #48

Closed DanielOgorchock closed 3 years ago

DanielOgorchock commented 3 years ago

Introduces max rate for sending subcommands and rumble data. Sends rumble data after receiving an input report. Improve the logic for not sending zero-amp rumble data packets in order to avoid situations where rumble gets stuck on until timing out.

Signed-off-by: Daniel J. Ogorchock djogorchock@gmail.com

v1993 commented 3 years ago

Looking forward to testing this! Small suggestion: bump version to 3.2 in dkms.conf and readme.

v1993 commented 3 years ago

Checked this out just now. It seems that disconnects are less often now and gyro drifts less while rumble is active (so, thanks for this!), but:

I'm not sure if it was described before, but controller fails like this:

  1. Some rumble is played for longer than expected and then terminates
  2. No more rumble is played for a couple of seconds, inputs keeps working
  3. OS declares that controller was disconnected, so input stops working
  4. Controller lights shut down few seconds later
DanielOgorchock commented 3 years ago

I'm getting some disconnects as well. I did just find an issue with how I'm rate limiting the rumble commands which I just fixed/updated in the latest commit. I think there's still lingering disconnects though.

v1993 commented 3 years ago

Yup, disconnects are still happening on last commit, but seemingly less. Inaccurate timing is not exactly nice (especially for short rumble pules used in rhythm games), but I guess it's sorta tolerable.