-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathfanatec.rules
27 lines (23 loc) · 1.31 KB
/
fanatec.rules
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
ACTION!="add|change", GOTO="fanatec_end"
SUBSYSTEM=="hid", DRIVER=="fanatec", GOTO="ftec_module_settings"
SUBSYSTEM=="input", DRIVERS=="fanatec", GOTO="ftec_input_settings"
SUBSYSTEM=="ftec_tuning", ACTION=="add", GOTO="ftec_tuning_settings"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0eb7", MODE="0666"
GOTO="fanatec_end"
LABEL="ftec_module_settings"
# let everyone in games group read/write device attributes, such as range, display, LEDs
# FIXME: this should be narrowed down in the future!
RUN+="/bin/sh -c 'cd %S%p && (chown -f :games range display load rumble leds/*/brightness; chmod -f 660 leds/*/brightness)'"
GOTO="fanatec_end"
LABEL="ftec_input_settings"
# remove deadzone/fuzz, fix ranges of analog stick
RUN+="/bin/sh -c '/usr/bin/evdev-joystick --evdev $devnode --deadzone 0 --fuzz 0 --flatness 0; \
/usr/bin/evdev-joystick --evdev $devnode --axis 3 --min -128 --max 128; \
/usr/bin/evdev-joystick --evdev $devnode --axis 4 --min -128 --max 128'"
GOTO="fanatec_end"
LABEL="ftec_tuning_settings"
# let everyone in games group read/write tuning-menu entries
# FIXME: this should be narrowed down in the future! Also, this fires every time a value is changed!
RUN+="/bin/sh -c 'cd %S%p && chown -f :games advanced_mode RESET SLOT SEN FF SHO BLI DRI FOR SPR DPR NDP NFR FEI INT NIN FUL || true'"
GOTO="fanatec_end"
LABEL="fanatec_end"