joystick: add override state (#38423)

fix js joverride
This commit is contained in:
Shane Smiskol
2026-07-22 17:24:38 -07:00
committed by GitHub
parent 0bac3c9039
commit 49c3b8fc34
+1
View File
@@ -34,6 +34,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.override = CC.enabled and not CC.longActive and CP.openpilotLongitudinalControl
CC.cruiseControl.cancel = sm['carState'].cruiseState.enabled and (not CC.enabled or not CP.pcmCruise)
CC.hudControl.leadDistanceBars = 2