|
|
@ -404,7 +404,7 @@ class Controls: |
|
|
|
elif self.CP.pcmCruise and CS.cruiseState.enabled: |
|
|
|
elif self.CP.pcmCruise and CS.cruiseState.enabled: |
|
|
|
self.v_cruise_kph = CS.cruiseState.speed * CV.MS_TO_KPH |
|
|
|
self.v_cruise_kph = CS.cruiseState.speed * CV.MS_TO_KPH |
|
|
|
|
|
|
|
|
|
|
|
# decrease the soft disable timer at every step, as it's reset on |
|
|
|
# decrement the soft disable timer at every step, as it's reset on |
|
|
|
# entrance in SOFT_DISABLING state |
|
|
|
# entrance in SOFT_DISABLING state |
|
|
|
self.soft_disable_timer = max(0, self.soft_disable_timer - 1) |
|
|
|
self.soft_disable_timer = max(0, self.soft_disable_timer - 1) |
|
|
|
|
|
|
|
|
|
|
@ -426,7 +426,7 @@ class Controls: |
|
|
|
if self.state == State.enabled: |
|
|
|
if self.state == State.enabled: |
|
|
|
if self.events.any(ET.SOFT_DISABLE): |
|
|
|
if self.events.any(ET.SOFT_DISABLE): |
|
|
|
self.state = State.softDisabling |
|
|
|
self.state = State.softDisabling |
|
|
|
self.soft_disable_timer = 300 # 3s |
|
|
|
self.soft_disable_timer = int(3 / DT_CTRL) |
|
|
|
self.current_alert_types.append(ET.SOFT_DISABLE) |
|
|
|
self.current_alert_types.append(ET.SOFT_DISABLE) |
|
|
|
|
|
|
|
|
|
|
|
# SOFT DISABLING |
|
|
|
# SOFT DISABLING |
|
|
|