From 274885fc4d6b1bffafa2b78e628f4fb3005ed52e Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Thu, 3 Mar 2022 05:23:14 -0800 Subject: [PATCH] controlsd: fix vCruise jumping on pcmCruise cars (#23388) * clean up v_cruise_kph fix fix * Revert "clean up v_cruise_kph" This reverts commit 211b5c3dbe073414ef5c39b19d6d2c6e8de2cf0b. * always update vCruise and don't init if pcmCruise * revert change * update refs --- selfdrive/controls/controlsd.py | 3 ++- selfdrive/test/process_replay/ref_commit | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/selfdrive/controls/controlsd.py b/selfdrive/controls/controlsd.py index 4aaeabdf94..d9c06c53ea 100755 --- a/selfdrive/controls/controlsd.py +++ b/selfdrive/controls/controlsd.py @@ -455,7 +455,8 @@ class Controls: else: self.state = State.enabled self.current_alert_types.append(ET.ENABLE) - self.v_cruise_kph = initialize_v_cruise(CS.vEgo, CS.buttonEvents, self.v_cruise_kph_last) + if not self.CP.pcmCruise: + self.v_cruise_kph = initialize_v_cruise(CS.vEgo, CS.buttonEvents, self.v_cruise_kph_last) # Check if actuators are enabled self.active = self.state == State.enabled or self.state == State.softDisabling diff --git a/selfdrive/test/process_replay/ref_commit b/selfdrive/test/process_replay/ref_commit index 2337a500df..1993b05fb7 100644 --- a/selfdrive/test/process_replay/ref_commit +++ b/selfdrive/test/process_replay/ref_commit @@ -1 +1 @@ -10555bbd908c7eead5eeaa36ab07ec2189845a95 \ No newline at end of file +595f118aa4f6eebacaef4db77179c108ec725483 \ No newline at end of file