joystickd: add cruise control resume (#36876)

* Add cruise control resume logic based on conditions

* simple
This commit is contained in:
Shane Smiskol
2025-12-15 15:36:28 -08:00
committed by GitHub
parent e2fd6f34e9
commit 9d9e5aa02d

View File

@@ -48,6 +48,7 @@ def joystickd_thread():
if CC.longActive:
actuators.accel = 4.0 * float(np.clip(joystick_axes[0], -1, 1))
actuators.longControlState = LongCtrlState.pid if sm['carState'].vEgo > CP.vEgoStopping else LongCtrlState.stopping
CC.cruiseControl.resume = actuators.accel > 0.0
if CC.latActive:
max_curvature = MAX_LAT_ACCEL / max(sm['carState'].vEgo ** 2, 5)