From b96b60fa6ce983e27c6ac0bc3dce2505049c7206 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Fri, 30 Aug 2024 18:42:28 -0700 Subject: [PATCH] joystickd: lower deadzone old-commit-hash: 0a737d9a2e703b79a9fff83eb3847496323216b7 --- tools/joystick/joystickd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/joystick/joystickd.py b/tools/joystick/joystickd.py index aa32b6def3..231e964781 100755 --- a/tools/joystick/joystickd.py +++ b/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