From 4208fe018e898d9f3cde1b2ac8feb29d9bb11ce6 Mon Sep 17 00:00:00 2001 From: Dean Lee Date: Tue, 11 Jan 2022 01:46:02 +0800 Subject: [PATCH] LongControl: remove redundant check on active (#23481) --- selfdrive/controls/lib/longcontrol.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/selfdrive/controls/lib/longcontrol.py b/selfdrive/controls/lib/longcontrol.py index f49a4e6f3..b14ffdc6c 100644 --- a/selfdrive/controls/lib/longcontrol.py +++ b/selfdrive/controls/lib/longcontrol.py @@ -26,8 +26,7 @@ def long_control_state_trans(CP, active, long_control_state, v_ego, v_target_fut else: if long_control_state == LongCtrlState.off: - if active: - long_control_state = LongCtrlState.pid + long_control_state = LongCtrlState.pid elif long_control_state == LongCtrlState.pid: if stopping_condition: