From 14683140c9699a859b1a805dacd31ec7668cde18 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Sat, 15 May 2021 21:27:23 -0700 Subject: [PATCH] This is probably better --- selfdrive/car/honda/carcontroller.py | 4 ++++ selfdrive/controls/controlsd.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/selfdrive/car/honda/carcontroller.py b/selfdrive/car/honda/carcontroller.py index 4d1c60d4ab..3638dd5441 100644 --- a/selfdrive/car/honda/carcontroller.py +++ b/selfdrive/car/honda/carcontroller.py @@ -101,6 +101,10 @@ class CarController(): # 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 (pedal) + # Cancel cmd causes brakes to release at a standstill + pcm_cancel_cmd &= CS.CP.enableCruise + # *** rate limit after the enable check *** self.brake_last = rate_limit(brake, self.brake_last, -2., DT_CTRL) diff --git a/selfdrive/controls/controlsd.py b/selfdrive/controls/controlsd.py index 22d10b5c64..cfd81bc451 100755 --- a/selfdrive/controls/controlsd.py +++ b/selfdrive/controls/controlsd.py @@ -450,7 +450,7 @@ class Controls: CC.actuators = actuators CC.cruiseControl.override = True - CC.cruiseControl.cancel = (not self.CP.enableCruise and not self.CP.enableGasInterceptor) or (not self.enabled and CS.cruiseState.enabled) + CC.cruiseControl.cancel = not self.CP.enableCruise or (not self.enabled and CS.cruiseState.enabled) # Some override values for Honda # brake discount removes a sharp nonlinearity