From e017d09fc9b3f8b4d2bedff8637cd79f9c989262 Mon Sep 17 00:00:00 2001 From: royjr Date: Wed, 1 Apr 2026 19:48:46 -0400 Subject: [PATCH] Update joystickd.py --- tools/joystick/joystickd.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/joystick/joystickd.py b/tools/joystick/joystickd.py index 789dad5623..e00c6596e5 100755 --- a/tools/joystick/joystickd.py +++ b/tools/joystick/joystickd.py @@ -57,6 +57,10 @@ def joystickd_thread(): actuators.torque = float(np.clip(joystick_axes[1], -1, 1)) actuators.steeringAngleDeg, actuators.curvature = actuators.torque * max_angle, actuators.torque * -max_curvature + if len(joystick_axes) > 2: + # axes[2] controls DAMP_FACTOR: [-1, 1] mapped to [3, 200] + actuators.dampFactor = float(np.interp(joystick_axes[2], [-1, 1], [3, 200])) + pm.send('carControl', cc_msg) cs_msg = messaging.new_message('controlsState')