Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix infinite rumble. #36

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Elinvention
Copy link
Contributor

I don't understand this part of the code. But it seems to work fine with this fix. Fixes #31.

@ToadKing
Copy link
Owner

ToadKing commented Sep 6, 2019

That code was made to handle the case where EV_FF events with a duration of 0 would be handled as "always active".

Can you log the events that are causing this to happen? I noticed #31 mentions GRID. It could be we're accidentally treating force-feedback events as rumble events, since looking again I don't think we actually check the UI_FF_UPLOAD event type. We report we only support FF_RUMBLE and FF_CONSTANT but it could be we need to handle those differently, or we're getting events we don't report as supported.

@Elinvention
Copy link
Contributor Author

Elinvention commented Sep 6, 2019

Can you log the events that are causing this to happen?

Yes, I logged some of those events. I don't have Grid, but "I hate running backwards" is another game that cause the same issue.

{ "time": 5456.99125; "type": 0x0101; "code": 0x0001; "value": 0x00000000; }
{ "time": 5456.100125; "type": 0x0015; "code": 0x0000; "value": 0x00000001; }
{ "in_use": true; "forever": true; "duration": 0; "delay": 0; "repetitions": 0; "start_time": 1567788882.221840935; "end_time": 1567788882.221840935 }
{ "time": 5456.214961; "type": 0x0101; "code": 0x0001; "value": 0x00000000; }
{ "time": 5456.220076; "type": 0x0015; "code": 0x0000; "value": 0x00000001; }
{ "in_use": true; "forever": true; "duration": 0; "delay": 0; "repetitions": 0; "start_time": 1567788882.341850455; "end_time": 1567788882.341850455 }
{ "time": 5457.965109; "type": 0x0101; "code": 0x0001; "value": 0x00000000; }
{ "time": 5457.972297; "type": 0x0015; "code": 0x0000; "value": 0x00000001; }
{ "in_use": true; "forever": true; "duration": 0; "delay": 0; "repetitions": 0; "start_time": 1567788884.93871887; "end_time": 1567788884.93871887 }
{ "time": 5458.80421; "type": 0x0101; "code": 0x0001; "value": 0x00000000; }
{ "time": 5458.84153; "type": 0x0015; "code": 0x0000; "value": 0x00000001; }
{ "in_use": true; "forever": true; "duration": 0; "delay": 0; "repetitions": 0; "start_time": 1567788884.205879159; "end_time": 1567788884.205879159 }
{ "time": 5461.2147; "type": 0x0101; "code": 0x0001; "value": 0x00000000; }
{ "time": 5461.4135; "type": 0x0015; "code": 0x0000; "value": 0x00000001; }
{ "in_use": true; "forever": true; "duration": 0; "delay": 0; "repetitions": 0; "start_time": 1567788887.125913355; "end_time": 1567788887.125913355 }
{ "time": 5461.100106; "type": 0x0101; "code": 0x0001; "value": 0x00000000; }
{ "time": 5461.100137; "type": 0x0015; "code": 0x0000; "value": 0x00000001; }
{ "in_use": true; "forever": true; "duration": 0; "delay": 0; "repetitions": 0; "start_time": 1567788887.221932378; "end_time": 1567788887.221932378 }
{ "time": 5462.635574; "type": 0x0101; "code": 0x0001; "value": 0x00000000; }
{ "time": 5462.636192; "type": 0x0015; "code": 0x0000; "value": 0x00000001; }
{ "in_use": true; "forever": true; "duration": 0; "delay": 0; "repetitions": 0; "start_time": 1567788888.757967419; "end_time": 1567788888.757967419 }
{ "time": 5463.147079; "type": 0x0101; "code": 0x0001; "value": 0x00000000; }
{ "time": 5463.148159; "type": 0x0015; "code": 0x0000; "value": 0x00000001; }
{ "in_use": true; "forever": true; "duration": 0; "delay": 0; "repetitions": 0; "start_time": 1567788889.269945238; "end_time": 1567788889.269945238 }
{ "time": 5465.873462; "type": 0x0015; "code": 0x0000; "value": 0x00000000; }
{ "time": 5465.873463; "type": 0x0101; "code": 0x0002; "value": 0x00000000; }

we're getting events we don't report as supported.

From what I can see that's not the case.

I don't know much about FF_RUMBLE and FF_CONSTANT, what's the difference?

@ToadKing
Copy link
Owner

ToadKing commented Sep 8, 2019

Can you try logging the event uploading parts, especially the values in the ff_effect struct? My next guess is the games are possibly just using one event running all the time but adjusting the strength of it, which we don't have control over with a GC controller.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problem with Rumble
2 participants