From 067bd2b8fd0734f1f79fa55045f4eadf11ff5273 Mon Sep 17 00:00:00 2001 From: Jason Wen Date: Tue, 23 Jul 2024 17:55:49 -0400 Subject: [PATCH] less if/else --- selfdrive/car/hyundai/carcontroller.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/selfdrive/car/hyundai/carcontroller.py b/selfdrive/car/hyundai/carcontroller.py index 0be27a3523..4d70930f21 100644 --- a/selfdrive/car/hyundai/carcontroller.py +++ b/selfdrive/car/hyundai/carcontroller.py @@ -550,9 +550,9 @@ class CarController(CarControllerBase): self.accel_last = self.accel_val def fast_resume(self, actuators, enabled, stopping): + self.acc_enabled = enabled + if actuators.longControlState == LongCtrlState.starting and self.acc_enabled and self.prev_stop_req: self.acc_enabled = False - else: - self.acc_enabled = enabled self.prev_stop_req = stopping