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

T2PA pedals (from the T300 RS) are incorrectly detected as clutch and brake #24

Closed
ric2b opened this issue Aug 20, 2021 · 7 comments
Closed

Comments

@ric2b
Copy link

ric2b commented Aug 20, 2021

Hello,

As the title says, I've tried both Project Cars 2 under Proton and the Oversteer aplication and both detect the wheel correctly but neither one has the gas pedal working.

Oversteer shows the T2PA pedals as clutch and brake instead of brake and gas, PC2 only detects the brake. I've made sure that the wheel is in the correct mode, with the red light and PS3 selected. I've also tried to select the green pedal mode but it didn't make a difference.

Do you have any idea what the issue might be?

I would be happy to try to debug it myself and open a PR with a fix if you could give me some tips on where to get started :)

@Kimplul
Copy link
Owner

Kimplul commented Aug 20, 2021

Hi, thanks for the report. Just to get the obvious solution out of the way, have you tried remapping the pedals?

The pedals work with the HID subsystem, and the wheel's rdesc reports the pedals as axes X, Y and Rz. Some games seem to assume X is the gas, while others Y. I don't think I've seen anyone assume Rz is the gas pedal, though I'm not sure if that's because nobody does or I just haven't seen it yet. Either way, depending on which pedal set is connected to the wheel, either two of the axes or all three are used for pedals. I have a working T3PA set which uses all three axes, and I remember the default pedals being correctly mapped in Oversteer, though they later broke and I can't test with them any more. I've usually used Oversteer as the 'correct' indicator, if it thinks my pedals are correctly mapped then everyone who doesn't agree must be wrong.

In short, not entirely sure why your pedals are mapped incorrectly, could be a firmware or wheel revision thing, or maybe even a global remapping in Linux. If it's a wheel revision thing, the 'best' solution would probably be to figure out how to tell different revisions apart and then modify the rdesc accordingly, though that needs some reverse engineering.

@berarma
Copy link

berarma commented Aug 20, 2021

Probaby I'm doing it wrong in Oversteer. It remaps the inputs on modern devices while I think it shouldn't be needed. I just took what seemed to be the common way to map them but it seems I looked at some old code. I'll probably change it so most modern devices will work correctly without the need to remap. I'll review it.

Games are another thing though. They should detect the wheel and remap when needed. Or at least allow for manual remapping. Oversteer doesn't help games recognize the inputs.

@ric2b
Copy link
Author

ric2b commented Aug 20, 2021

So I used evtest, the wheel shows up as "Thrustmaster Thrustmaster T300RS Racing wheel", the brake is mapped as ABS_Y (code 1) and the throttle is ABS_RZ (code 5). The wheel rotation is ABS_X (code 0).

I'm not used to digging into input devices but here's the content of /sys/bus/hid/devices/0003:044F:B66E.0007/input/input24/uevent, might be useful to identify the specific model:

PRODUCT=3/44f/b66e/111
NAME="Thrustmaster Thrustmaster T300RS Racing wheel"
PHYS="usb-0000:00:14.0-7/input0"
UNIQ=""
PROP=0
EV=1b
KEY=1fff00000000 0 0 0 0
ABS=30063
MSC=10
MODALIAS=input:b0003v044FpB66Ee0111-e0,1,3,4,k120,121,122,123,124,125,126,127,128,129,12A,12B,12C,ra0,1,5,6,10,11,m4,lsfw

And /sys/bus/hid/devices/0003:044F:B66E.0007/uevent:

cat /sys/bus/hid/devices/0003:044F:B66E.0007/uevent                                                                                                          sex 20 ago 2021 11:44:24
DRIVER=hid-generic
HID_ID=0003:0000044F:0000B66E
HID_NAME=Thrustmaster Thrustmaster T300RS Racing wheel
HID_PHYS=usb-0000:00:14.0-7/input0
HID_UNIQ=
MODALIAS=hid:b0003g0001v0000044Fp0000B66E

I'm not sure how to remap the pedals, I've searched around a bit and I'm not finding what tool I should use for that.

It indeed looks like the mapping on Oversteer converts the pedals from brake to clutch and throttle to brake, for this model:
https://github.com/berarma/oversteer/blob/0.6.0/oversteer/device.py#L368-L374

I'm confused about where a fix is needed since PC2 doesn't seem to respond to the throttle pedal at all (brake works but clutch and throttle are not available), so it's not just an Oversteer issue.

@ric2b
Copy link
Author

ric2b commented Aug 20, 2021

Just tried WRECKFEST and it lets me remap the controls. Brake is Y axis and Throttle is Z axis according to it. Wheel is X axis. No FFB though.

edit: Also just noticed PC2 also lets me remap and I was able to map the pedals correctly 🤦 But also no FFB.

@Raboebie
Copy link

@ric2b refer to my thread here which might help getting FFB to work #21

@ric2b
Copy link
Author

ric2b commented Aug 20, 2021

@Raboebie Was just looking through the FFB related issues and managed to fix it for PC2 after repeating the steps here: #5 (comment), so I guess my initial installation based on the repo README.md instructions had some kind of issue.

I'll close this issue since it looks the mapping is a per-application issue and unrelated to the driver.

Thank you all for being so supportive :)

@ric2b ric2b closed this as completed Aug 20, 2021
@Kimplul
Copy link
Owner

Kimplul commented Aug 20, 2021

Good that you got it working. Sorry about getting the pedal maps (X, Y...) wrong, should've double-checked.

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

No branches or pull requests

4 participants