From e088fde67edcc32ccfeea23b4ae9e44845240429 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Thu, 30 Jun 2022 13:58:38 -0700 Subject: [PATCH] no walrus --- selfdrive/controls/controlsd.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/selfdrive/controls/controlsd.py b/selfdrive/controls/controlsd.py index c08d5bd01e038c..6b6d4d6a5b88a3 100755 --- a/selfdrive/controls/controlsd.py +++ b/selfdrive/controls/controlsd.py @@ -646,7 +646,9 @@ def publish_logs(self, CS, start_time, CC, lac_log): CC.cruiseControl.cancel = CS.cruiseState.enabled and (not self.enabled or not self.CP.pcmCruise) if self.joystick_mode and self.sm.rcv_frame['testJoystick'] > 0 and self.sm['testJoystick'].buttons[0]: CC.cruiseControl.cancel = True - if len(speeds := self.sm['longitudinalPlan'].speeds): + + speeds = self.sm['longitudinalPlan'].speeds + if len(speeds): CC.cruiseControl.resume = self.enabled and CS.cruiseState.standstill and speeds[-1] > 0.1 hudControl = CC.hudControl