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

pull/23431/head
Dean Lee 4 years ago committed by GitHub
parent c7fb8f4e32
commit e0338fd77b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      selfdrive/controls/controlsd.py

@ -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

Loading…
Cancel
Save