GM: use ECM brake-pressed threshold (#25970)

* This brake position value disengages stock ACC, use it to avoid controls mismatch. 2016-2017 Volt will hit this threshold and disengage, must install new design of brake pedal retaining clip, TSB 16-NA-147.

* 80 hz

* comment

* bump panda

* update refs

* bump panda

* bump panda

* bump panda

* bump panda to master

Co-authored-by: qadmus <42746943+qadmus@users.noreply.github.com>
pull/26008/head
Shane Smiskol 3 years ago committed by GitHub
parent 8cee561dbf
commit 6ce511cc60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      panda
  2. 13
      selfdrive/car/gm/carstate.py
  3. 2
      selfdrive/test/process_replay/ref_commit

@ -1 +1 @@
Subproject commit 3334dc21f5c55007c5a754dfd8ee5d642be3e2bb
Subproject commit 1303af2db29a72eee180b10c6097fa5b19c29207

@ -40,9 +40,12 @@ class CarState(CarStateBase):
else:
ret.gearShifter = self.parse_gear_shifter(self.shifter_values.get(pt_cp.vl["ECMPRDNL2"]["PRNDL2"], None))
# Brake pedal's potentiometer returns near-zero reading even when pedal is not pressed.
ret.brake = pt_cp.vl["EBCMBrakePedalPosition"]["BrakePedalPosition"] / 0xd0
ret.brakePressed = pt_cp.vl["EBCMBrakePedalPosition"]["BrakePedalPosition"] >= 10
# Some Volt 2016-17 have loose brake pedal push rod retainers which causes the ECM to believe
# that the brake is being intermittently pressed without user interaction.
# 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"] / 0xd0
ret.brakePressed = pt_cp.vl["ECMAcceleratorPos"]["BrakePedalPos"] >= 8
# Regen braking is braking
if self.CP.transmissionType == TransmissionType.direct:
@ -100,7 +103,7 @@ class CarState(CarStateBase):
def get_can_parser(CP):
signals = [
# sig_name, sig_address
("BrakePedalPosition", "EBCMBrakePedalPosition"),
("BrakePedalPos", "ECMAcceleratorPos"),
("FrontLeftDoor", "BCMDoorBeltStatus"),
("FrontRightDoor", "BCMDoorBeltStatus"),
("RearLeftDoor", "BCMDoorBeltStatus"),
@ -141,7 +144,7 @@ class CarState(CarStateBase):
("ASCMSteeringButton", 33),
("ECMEngineStatus", 100),
("PSCMSteeringAngle", 100),
("EBCMBrakePedalPosition", 100),
("ECMAcceleratorPos", 80),
]
if CP.transmissionType == TransmissionType.direct:

@ -1 +1 @@
f9536e41a6a160bdaa29d42bb164b0e4033857e5
338c24158bb28952dcd1554ea91734b4281e2fed
Loading…
Cancel
Save