From e4ad4a8e13c654df67b7106a021d2b8177cf18f0 Mon Sep 17 00:00:00 2001 From: ShaneSmiskol Date: Tue, 18 May 2021 01:41:24 -0700 Subject: [PATCH] Honda - Don't send cancel cmd when using comma pedal (#20922) * cancel is never true if cruise isn't enabled and pedal * This is probably better * comment * want to see if this fails * see what Actions says about this * nice! just as a sanity test real quick * Revert "nice! just as a sanity test real quick" This reverts commit 2d86d1c32eca5ca8efb9b5d15483c65ce51c777a. * Revert "see what Actions says about this" This reverts commit c908488854ec391cc2ec0c2684739b94c5e526cc. * Revert "want to see if this fails" This reverts commit 2d515f37215095cedb790433429487d991630a9b. * specify the fix * No bitwise Co-authored-by: Willem Melching Co-authored-by: Willem Melching old-commit-hash: 483678adb1c6f107e743331daf720af4849120f9 --- selfdrive/car/honda/carcontroller.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/selfdrive/car/honda/carcontroller.py b/selfdrive/car/honda/carcontroller.py index 4d1c60d4ab..53304583b2 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 (no cruise if pedal) + # Cancel cmd causes brakes to release at a standstill causing grinding + pcm_cancel_cmd = pcm_cancel_cmd and CS.CP.enableCruise + # *** rate limit after the enable check *** self.brake_last = rate_limit(brake, self.brake_last, -2., DT_CTRL)