controlsd/state_transition: remove redundant check in elif (#23428)

old-commit-hash: e0338fd77b98073673f48213336965349e7194a9
This commit is contained in:
Dean Lee
2022-01-06 22:54:19 +08:00
committed by GitHub
parent 4c6fcce21f
commit 60a22bbc0c
+1 -1
View File
@@ -404,7 +404,7 @@ class Controls:
# if stock cruise is completely disabled, then we can use our own set speed logic
if not self.CP.pcmCruise:
self.v_cruise_kph = update_v_cruise(self.v_cruise_kph, CS.buttonEvents, self.button_timers, self.enabled, self.is_metric)
elif self.CP.pcmCruise and CS.cruiseState.enabled:
elif CS.cruiseState.enabled:
self.v_cruise_kph = CS.cruiseState.speed * CV.MS_TO_KPH
# decrement the soft disable timer at every step, as it's reset on