From 1965b2fd6e6f2b6ab929ab386bd1b899a56d18e4 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Wed, 6 Nov 2024 19:46:05 -0600 Subject: [PATCH] joystick: add cancel logic (#33950) match cancel logic --- tools/joystick/joystickd.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/joystick/joystickd.py b/tools/joystick/joystickd.py index dc1186c29..3e3aed34a 100755 --- a/tools/joystick/joystickd.py +++ b/tools/joystick/joystickd.py @@ -31,6 +31,7 @@ def joystickd_thread(): CC.enabled = sm['selfdriveState'].enabled CC.latActive = sm['selfdriveState'].active and not sm['carState'].steerFaultTemporary and not sm['carState'].steerFaultPermanent CC.longActive = CC.enabled and not any(e.overrideLongitudinal for e in sm['onroadEvents']) and CP.openpilotLongitudinalControl + CC.cruiseControl.cancel = sm['carState'].cruiseState.enabled and (not CC.enabled or not CP.pcmCruise) CC.hudControl.leadDistanceBars = 2 actuators = CC.actuators