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

Add Thrustmaster TMX Force Feedback #169

Merged
merged 1 commit into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions data/udev/99-thrustmaster-wheel-perms.rules
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ ACTION=="add", SUBSYSTEM=="hid", ATTRS{idVendor}=="044f", ATTRS{idProduct}=="b69

# Thrustmaster T150 Racing Wheel (USB)
ACTION=="add", SUBSYSTEM=="hid", ATTRS{idVendor}=="044f", ATTRS{idProduct}=="b677", DRIVER=="hid-t150", RUN+="/bin/sh -c 'cd %S%p; chmod 666 range gain autocenter'"

# Thrustmaster TMX Racing Wheel (USB)
ACTION=="add", SUBSYSTEM=="hid", ATTRS{idVendor}=="044f", ATTRS{idProduct}=="b67f", DRIVER=="hid-t150", RUN+="/bin/sh -c 'cd %S%p; chmod 666 range gain autocenter'"
2 changes: 1 addition & 1 deletion oversteer/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ def normalize_event(self, event):
event.code = ecodes.ABS_RZ
elif event.code == ecodes.ABS_RZ:
event.code = ecodes.ABS_Y
elif self.usb_id in [wid.TM_T248, wid.TM_T150]:
elif self.usb_id in [wid.TM_T248, wid.TM_T150, wid.TM_TMX]:
if event.code == ecodes.ABS_RZ:
event.code = ecodes.ABS_Z
elif event.code == ecodes.ABS_Y:
Expand Down
35 changes: 18 additions & 17 deletions oversteer/device_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,37 +9,38 @@ class DeviceManager:

def __init__(self):
self.supported_wheels = {
wid.FT_CSL_DD: 1080,
wid.FT_CSL_ELITE: 1080,
wid.FT_CSL_ELITE_PS4: 1080,
wid.FT_CSV25: 900,
wid.FT_CSV2: 900,
wid.FT_PDD1: 1080,
wid.FT_PDD2: 1080,
wid.LG_DF: 270,
wid.LG_DFGT: 900,
wid.LG_DFP: 900,
wid.LG_G25: 900,
wid.LG_G27: 900,
wid.LG_G29: 900,
wid.LG_G920: 900,
wid.LG_G923X: 900,
wid.LG_G923P: 900,
wid.LG_G923X: 900,
wid.LG_GPRO: 1080,
wid.LG_DF: 270,
wid.LG_MOMO2: 270,
wid.LG_MOMO: 270,
wid.LG_DFP: 900,
wid.LG_G25: 900,
wid.LG_DFGT: 900,
wid.LG_G27: 900,
wid.LG_SFW: 270,
wid.LG_MOMO2: 270,
wid.LG_WFG: 180,
wid.LG_WFFG: 180,
wid.TM_FFRW: 180,
wid.TM_T80: 240,
wid.LG_WFG: 180,
wid.TM_F458: 240,
wid.TM_FFRW: 180,
wid.TM_T150: 1080,
wid.TM_T248: 900,
wid.TM_T300RS: 1080,
wid.TM_T300RS_FF1: 1080,
wid.TM_T500RS: 1080,
wid.TM_T80: 240,
wid.TM_TMX: 900,
wid.TM_TX: 900,
wid.FT_CSL_ELITE: 1080,
wid.FT_CSL_ELITE_PS4: 1080,
wid.FT_CSV2: 900,
wid.FT_CSV25: 900,
wid.FT_PDD1: 1080,
wid.FT_PDD2: 1080,
wid.FT_CSL_DD: 1080,
wid.XX_FFBOARD: 1080,
}
self.devices = {}
Expand Down
35 changes: 18 additions & 17 deletions oversteer/wheel_ids.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,37 @@
VENDOR_THRUSTMASTER = '044f'
VENDOR_FANATEC = '0eb7'

FT_CSL_DD = '0eb7:0020'
FT_CSL_ELITE = '0eb7:0e03'
FT_CSL_ELITE_PS4 = '0eb7:0005'
FT_CSV2 = '0eb7:0001'
FT_CSV25 = '0eb7:0004'
FT_PDD1 = '0eb7:0006'
FT_PDD2 = '0eb7:0007'
LG_DF = '046d:c294'
LG_DFGT = '046d:c29a'
LG_DFP = '046d:c298'
LG_G25 = '046d:c299'
LG_G27 = '046d:c29b'
LG_G29 = '046d:c24f'
LG_G920 = '046d:c262'
LG_G923X = '046d:c26e'
LG_G923P = '046d:c266'
LG_G923X = '046d:c26e'
LG_GPRO = '046d:c272'
LG_DF = '046d:c294'
LG_MOMO = '046d:c295'
LG_DFP = '046d:c298'
LG_G25 = '046d:c299'
LG_DFGT = '046d:c29a'
LG_G27 = '046d:c29b'
LG_SFW = '046d:c29c'
LG_MOMO2 = '046d:ca03'
LG_WFG = '046d:c20e'
LG_SFW = '046d:c29c'
LG_WFFG = '046d:c293'
TM_FFRW = '06f8:0004'
TM_T80 = '044f:b668'
LG_WFG = '046d:c20e'
TM_F458 = '24c6:5b00'
TM_FFRW = '06f8:0004'
TM_T150 = '044f:b677'
TM_T248 = '044f:b696'
TM_T300RS = '044f:b66e'
TM_T300RS_FF1 = '044f:b66f'
TM_T500RS = '044f:b65e'
TM_T80 = '044f:b668'
TM_TMX = '044f:b67f'
TM_TX = '044f:b664'
FT_CSL_ELITE = '0eb7:0e03'
FT_CSL_ELITE_PS4 = '0eb7:0005'
FT_CSV2 = '0eb7:0001'
FT_CSV25 = '0eb7:0004'
FT_PDD1 = '0eb7:0006'
FT_PDD2 = '0eb7:0007'
FT_CSL_DD = '0eb7:0020'
XX_FFBOARD = '1209:ffb0'