joystick: add cancel logic (#33950)

match cancel logic
This commit is contained in:
Shane Smiskol
2024-11-06 19:46:05 -06:00
committed by GitHub
parent aed8e5cbd5
commit 1965b2fd6e
+1
View File
@@ -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