From 7512d184bccf5e70d72b56b1724e79dcde5ae10d Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Fri, 14 Oct 2022 16:54:13 -0700 Subject: [PATCH] GM camera ACC: raise brake pressed threshold (#26081) * Different brake pressed thresholds * comment * bump to master old-commit-hash: 91a7bb4ea3f01f40a7d8e88e857d60ef090dad2c --- panda | 2 +- selfdrive/car/gm/carstate.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/panda b/panda index c39528d299..5962bcd08a 160000 --- a/panda +++ b/panda @@ -1 +1 @@ -Subproject commit c39528d299aae6a1ebbdbccddeae55bc76a534e3 +Subproject commit 5962bcd08ae4e7c5193535efb45cc9c39da52f54 diff --git a/selfdrive/car/gm/carstate.py b/selfdrive/car/gm/carstate.py index f90b130d93..21eb440d7f 100644 --- a/selfdrive/car/gm/carstate.py +++ b/selfdrive/car/gm/carstate.py @@ -51,7 +51,12 @@ class CarState(CarStateBase): # To avoid a cruise fault we need to match the ECM's brake pressed signal and threshold # https://static.nhtsa.gov/odi/tsbs/2017/MC-10137629-9999.pdf ret.brake = pt_cp.vl["ECMAcceleratorPos"]["BrakePedalPos"] - ret.brakePressed = ret.brake >= 8 + if self.CP.networkLocation != NetworkLocation.fwdCamera: + ret.brakePressed = ret.brake >= 8 + else: + # While car is braking, cancel button causes ECM to enter a soft disable state with a fault status. + # Match ECM threshold at a standstill to allow the camera to cancel earlier + ret.brakePressed = ret.brake >= 20 # Regen braking is braking if self.CP.transmissionType == TransmissionType.direct: