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

This commit is contained in:
Dean Lee
2022-01-06 22:54:19 +08:00
committed by GitHub
parent c7fb8f4e32
commit e0338fd77b
+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