|
|
@ -148,10 +148,7 @@ class Controls: |
|
|
|
|
|
|
|
|
|
|
|
CC.cruiseControl.override = CC.enabled and not CC.longActive and self.CP.openpilotLongitudinalControl |
|
|
|
CC.cruiseControl.override = CC.enabled and not CC.longActive and self.CP.openpilotLongitudinalControl |
|
|
|
CC.cruiseControl.cancel = CS.cruiseState.enabled and (not CC.enabled or not self.CP.pcmCruise) |
|
|
|
CC.cruiseControl.cancel = CS.cruiseState.enabled and (not CC.enabled or not self.CP.pcmCruise) |
|
|
|
|
|
|
|
CC.cruiseControl.resume = CC.enabled and CS.cruiseState.standstill and not self.sm['longitudinalPlan'].shouldStop |
|
|
|
speeds = self.sm['longitudinalPlan'].speeds |
|
|
|
|
|
|
|
if len(speeds): |
|
|
|
|
|
|
|
CC.cruiseControl.resume = CC.enabled and CS.cruiseState.standstill and speeds[-1] > 0.1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
hudControl = CC.hudControl |
|
|
|
hudControl = CC.hudControl |
|
|
|
hudControl.setSpeed = float(CS.vCruiseCluster * CV.KPH_TO_MS) |
|
|
|
hudControl.setSpeed = float(CS.vCruiseCluster * CV.KPH_TO_MS) |
|
|
|