diff --git a/selfdrive/car/honda/carcontroller.py b/selfdrive/car/honda/carcontroller.py index ad23f247b..9eb8da5ca 100644 --- a/selfdrive/car/honda/carcontroller.py +++ b/selfdrive/car/honda/carcontroller.py @@ -122,15 +122,6 @@ class CarController(): # *** apply brake hysteresis *** pre_limit_brake, self.braking, self.brake_steady = actuator_hystereses(brake, self.braking, self.brake_steady, CS.out.vEgo, CS.CP.carFingerprint) - # *** no output if not enabled *** - if not enabled and CS.out.cruiseState.enabled: - # send pcm acc cancel cmd if drive is disabled but pcm is still on, or if the system can't be activated - pcm_cancel_cmd = True - - # Never send cancel command if we never enter cruise state (no cruise if pedal) - # Cancel cmd causes brakes to release at a standstill causing grinding - pcm_cancel_cmd = pcm_cancel_cmd and CS.CP.pcmCruise - # *** rate limit after the enable check *** self.brake_last = rate_limit(pre_limit_brake, self.brake_last, -2., DT_CTRL) diff --git a/selfdrive/car/toyota/carcontroller.py b/selfdrive/car/toyota/carcontroller.py index 7a60ebc52..2d17ee20f 100644 --- a/selfdrive/car/toyota/carcontroller.py +++ b/selfdrive/car/toyota/carcontroller.py @@ -75,8 +75,9 @@ class CarController(): else: apply_steer_req = 1 + # TODO: probably can delete this. CS.pcm_acc_status uses a different signal + # than CS.cruiseState.enabled. confirm they're not meaningfully different if not enabled and CS.pcm_acc_status: - # send pcm acc cancel cmd if drive is disabled but pcm is still on, or if the system can't be activated pcm_cancel_cmd = 1 # on entering standstill, send standstill request diff --git a/selfdrive/controls/controlsd.py b/selfdrive/controls/controlsd.py index 3acd1837c..a8b9a6180 100755 --- a/selfdrive/controls/controlsd.py +++ b/selfdrive/controls/controlsd.py @@ -525,7 +525,7 @@ class Controls: CC.enabled = self.enabled CC.actuators = actuators - CC.cruiseControl.cancel = not self.CP.pcmCruise or (not self.enabled and CS.cruiseState.enabled) + CC.cruiseControl.cancel = CS.cruiseState.enabled and (not self.enabled or not self.CP.pcmCruise) if self.joystick_mode and self.sm.rcv_frame['testJoystick'] > 0 and self.sm['testJoystick'].buttons[0]: CC.cruiseControl.cancel = True diff --git a/selfdrive/test/process_replay/ref_commit b/selfdrive/test/process_replay/ref_commit index 1d995bad7..33dfbab50 100644 --- a/selfdrive/test/process_replay/ref_commit +++ b/selfdrive/test/process_replay/ref_commit @@ -1 +1 @@ -2282e3f208438237fe61d7bf636d6ad6b507c571 \ No newline at end of file +859486fc7698fc2c0de0b52854a38e6c08954204 \ No newline at end of file