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 <willem.melching@gmail.com>

Co-authored-by: Willem Melching <willem.melching@gmail.com>
albatross
ShaneSmiskol 2021-05-18 01:41:24 -07:00 committed by GitHub
parent b4f8223b5b
commit 483678adb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -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)