CrazyRedMachine / LUFAHybridFightstick

Nintendo switch AND XInput controller for Arduino Leonardo and Pro Micro
GNU General Public License v3.0
52 stars 16 forks source link

SOCD last input input problem #12

Closed epiccpete closed 2 years ago

epiccpete commented 2 years ago

I've set my SOCD to LAST_INPUT and I'm having a problem where if I press and hold Left, then down, then right, and release down, it goes back to left instead of continuing on to right. Is there an easy way to fix this? The motion I'd like to do is hold left and then tap down and then right and get a half circle back to forward motion for Guilty Gear Strive

CrazyRedMachine commented 2 years ago

hi,

i gave the code a quick read and it seems like it should be working properly as far as clean_socd() goes, however the socd state change might be a little hard to trigger it seems, so just to make sure, you can try the following

https://github.com/CrazyRedMachine/LUFAHybridFightstick/blob/4497b245b819b18700de2b84728811332de14d04/LUFAHybridFightstick/LUFAHybridFightstick.ino#L108 https://github.com/CrazyRedMachine/LUFAHybridFightstick/blob/4497b245b819b18700de2b84728811332de14d04/LUFAHybridFightstick/LUFAHybridFightstick.ino#L109

put = LAST_INPUT for both variables there, then comment out (add "//" at the beginning of the lines) the EEPROM.get for socd on lines 222 and 223, this should ensure you are indeed in last input mode...

https://github.com/CrazyRedMachine/LUFAHybridFightstick/blob/4497b245b819b18700de2b84728811332de14d04/LUFAHybridFightstick/LUFAHybridFightstick.ino#L222 https://github.com/CrazyRedMachine/LUFAHybridFightstick/blob/4497b245b819b18700de2b84728811332de14d04/LUFAHybridFightstick/LUFAHybridFightstick.ino#L223

if that doesn't work, please try your motion in all directions (so left, down right and release down, right down left and release down, down right up and release right, etc and tell me if there's a similar issue or not)

thanks,

epiccpete commented 2 years ago

Thank you so much for the reply! Unfortunately I still don't have any luck. I'll use numeric pad notation to explain what happens..

So if I hold 4, 2, 6, I get 3 and if I release 2, I get 4. If press 2 again, I get 3. If I press 8, 4, 2, I get 1 and release 4, I get 8, if I press 4, I get 1. If I press 684, I get 7 and if I release 8 I get 6. If I press 862, I get 3 and if I release 6 I get 8

Same for every other combination, I get either a diagonal or the first button I press.. What happens if I use a brooks board with the same style of SOCD is 426 will give me 3 and if I release 2, it should give me 6, but it doesn't. However for some reason if I press 2, it does acknowledge the 6 and gives me 3 but if I release the 6 it jumps to 4. I hope that's not too confusing!

CrazyRedMachine commented 2 years ago

thanks for the details, I think I understand what's happening here, you can try the firmware from this branch : https://github.com/CrazyRedMachine/LUFAHybridFightstick/tree/socd_fix

epiccpete commented 2 years ago

That has fixed it.. Truly appreciate your help, thank you :)

CrazyRedMachine commented 2 years ago

glad to hear this, i'm gonna merge it to the main code :) and thank you very much for your appreciation :D