GM camera ACC: raise brake pressed threshold (#26081)

* Different brake pressed thresholds

* comment

* bump to master
This commit is contained in:
Shane Smiskol
2022-10-14 16:54:13 -07:00
committed by GitHub
parent c0840e0c33
commit 91a7bb4ea3
2 changed files with 7 additions and 2 deletions

2
panda

Submodule panda updated: c39528d299...5962bcd08a

View File

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