joystickd: lower deadzone

pull/33414/head
Shane Smiskol 1 year ago
parent f037d2216a
commit 0a737d9a2e
  1. 2
      tools/joystick/joystickd.py

@ -70,7 +70,7 @@ class Joystick:
norm = -interp(event[1], [self.min_axis_value[event[0]], self.max_axis_value[event[0]]], [-1., 1.])
norm = JS_EXPO * norm ** 3 + (1 - JS_EXPO) * norm
self.axes_values[event[0]] = norm if abs(norm) > 0.05 else 0. # center can be noisy, deadzone of 5%
self.axes_values[event[0]] = norm if abs(norm) > 0.02 else 0. # center can be noisy, deadzone of 2%
else:
return False
return True

Loading…
Cancel
Save