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

* Different brake pressed thresholds

* comment

* bump to master
pull/26088/head
Shane Smiskol 3 years ago committed by GitHub
parent c0840e0c33
commit 91a7bb4ea3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      panda
  2. 7
      selfdrive/car/gm/carstate.py

@ -1 +1 @@
Subproject commit c39528d299aae6a1ebbdbccddeae55bc76a534e3
Subproject commit 5962bcd08ae4e7c5193535efb45cc9c39da52f54

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

Loading…
Cancel
Save