Skip to content

Commit

Permalink
feat: add support for Logitech G PRO PS HIDPP mode
Browse files Browse the repository at this point in the history
  • Loading branch information
skryvel committed Aug 26, 2024
1 parent a418ffa commit 30ac120
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
3 changes: 3 additions & 0 deletions data/udev/99-logitech-wheel-perms.rules
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ LABEL="logitech-rules"
DRIVER=="logitech" GOTO="logitech-driver"
DRIVER!="logitech-hidpp-device" GOTO="end"

# Logitech G PRO Racing Wheel for PlayStation and PC
ATTRS{idProduct}=="c268", RUN+="/bin/sh -c 'cd %S%p; chmod 666 range leds/*/brightness; chmod 777 leds/ leds/*'"

# Logitech G PRO Racing Wheel for Xbox One and PC
ATTRS{idProduct}=="c272", RUN+="/bin/sh -c 'cd %S%p; chmod 666 range leds/*/brightness; chmod 777 leds/ leds/*'"

Expand Down
2 changes: 1 addition & 1 deletion oversteer/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ def normalize_event(self, event):
event.code = ecodes.ABS_Y
elif self.vendor_id == wid.VENDOR_FANATEC and event.code in [ecodes.ABS_Y, ecodes.ABS_Z, ecodes.ABS_RZ]:
event.value = int(event.value + 32768 / 257)
elif self.usb_id == wid.LG_GPRO:
elif self.usb_id in [wid.LG_GPRO_PS, wid.LG_GPRO_XBOX]:
if event.code in [ecodes.ABS_RX, ecodes.ABS_RY, ecodes.ABS_RZ]:
event.value = int(255 - event.value / 257)
if event.code == ecodes.ABS_RX:
Expand Down
3 changes: 2 additions & 1 deletion oversteer/device_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ def __init__(self):
wid.LG_G920: 900,
wid.LG_G923P: 900,
wid.LG_G923X: 900,
wid.LG_GPRO: 1080,
wid.LG_GPRO_PS: 1080,
wid.LG_GPRO_XBOX: 1080,
wid.LG_MOMO2: 270,
wid.LG_MOMO: 270,
wid.LG_SFW: 270,
Expand Down
3 changes: 2 additions & 1 deletion oversteer/wheel_ids.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
LG_G920 = '046d:c262'
LG_G923P = '046d:c266'
LG_G923X = '046d:c26e'
LG_GPRO = '046d:c272'
LG_GPRO_PS = '046d:c268'
LG_GPRO_XBOX = '046d:c272'
LG_MOMO = '046d:c295'
LG_MOMO2 = '046d:ca03'
LG_SFW = '046d:c29c'
Expand Down

0 comments on commit 30ac120

Please sign in to comment.