From 221f2648a9390ede12a31dd35f0ec76caa0c9dd5 Mon Sep 17 00:00:00 2001 From: Jason Wen Date: Tue, 6 Aug 2024 01:03:24 -0400 Subject: [PATCH 1/2] lower matches a bit more --- selfdrive/controls/lib/longitudinal_planner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/controls/lib/longitudinal_planner.py b/selfdrive/controls/lib/longitudinal_planner.py index 8cd3674970..976944228e 100755 --- a/selfdrive/controls/lib/longitudinal_planner.py +++ b/selfdrive/controls/lib/longitudinal_planner.py @@ -82,7 +82,7 @@ class LongitudinalPlanner: self.dt = dt self.a_desired = init_a - v_ego_sec = 0.75 if CP.carName == "hyundai" else 2.0 + v_ego_sec = 0.5 if CP.carName == "hyundai" else 2.0 self.v_desired_filter = FirstOrderFilter(init_v, v_ego_sec, self.dt) self.v_model_error = 0.0 From 8da8986135568c035a2eb17e46996f6783eeeca5 Mon Sep 17 00:00:00 2001 From: Jason Wen Date: Tue, 6 Aug 2024 01:05:07 -0400 Subject: [PATCH 2/2] need to stop this too --- selfdrive/controls/lib/longcontrol.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/controls/lib/longcontrol.py b/selfdrive/controls/lib/longcontrol.py index 975556b759..1a9e7c2fb7 100644 --- a/selfdrive/controls/lib/longcontrol.py +++ b/selfdrive/controls/lib/longcontrol.py @@ -14,7 +14,7 @@ def long_control_state_trans(CP, active, long_control_state, v_ego, should_stop, brake_pressed, cruise_standstill, resume): # Ignore cruise standstill if car has a gas interceptor cruise_standstill = cruise_standstill and not CP.enableGasInterceptorDEPRECATED - stopping_condition = should_stop + stopping_condition = should_stop and not resume starting_condition = ((not should_stop or resume) and not cruise_standstill and not brake_pressed)