Menkaura81 / Anyshift

A python app to convert joystick inputs into key strokes so you can play vintage driving games with a H-Shifter
GNU General Public License v3.0
3 stars 0 forks source link

"Detect Neutral" adds delay to shifting between gears #5

Closed itais closed 1 day ago

itais commented 5 days ago

"Detect Neutral" adds a few tenths of a second (I think) delay to shifting between gears. There is no such delay when shifting from Neutral into a gear. This is especially problematic when enabling the clutch, since when trying to shift quickly the shifting keystrokes are only sent after I already released the clutch so I get a miss shift.

Menkaura81 commented 5 days ago

That delay is real (0.3 sec). It's hardcoded into the code. It's there to give you time to change gears without changing into neutral in between. I can make this delay modifiable via the .ini so we can fine tune it

itais commented 5 days ago

A modifiable delay will help with quick shifts. To eliminate the issue completely, maybe change the behavior so it shifts to a new a gear as soon as it's detected, and only shifts to Neutral after the delay?

Menkaura81 commented 5 days ago

Maybe. I'm thinking on redoing the shifting logic. I will try some ideas during weekend

Menkaura81 commented 4 days ago

Just uploaded a release. Don´t expect too much changes, is just optimization and code refactoring, but I can´t find a solution for Detect Neutral delay at the moment. I will keep trying

Menkaura81 commented 2 days ago

Problem solved. Changed the delay for a timer. It only changes to neutral when the stick is left in neutral for a certain amount of time. I can´t test that everything works perfect right now. Expect a release tonight or maybe tomorrow

Menkaura81 commented 2 days ago

Released. Maybe we find some bugs in the wild, I didn´t test it enough

itais commented 1 day ago

Version 1.0.11 is working well for me, great work! There is no noticeable delay anymore while shifting between gears with "Detect Neutral" active and the Neutral detection works too.