Skip to content

Commit

Permalink
controlsd/state_transition: remove redundant check in elif (commaai#2…
Browse files Browse the repository at this point in the history
  • Loading branch information
deanlee authored Jan 6, 2022
1 parent c7fb8f4 commit e0338fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion selfdrive/controls/controlsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ def state_transition(self, CS):
# 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
Expand Down

0 comments on commit e0338fd

Please sign in to comment.