GM Camera: use ECM brake pressed bit (#26400)

* GM camera: use ECM brake pressed bit

* bump panda and use more reliable bit

* bump panda

* back to ECMEngineStatus

* bump

* Update selfdrive/car/gm/carstate.py

* bump panda

* Update ref_commit
pull/26641/head^2
Shane Smiskol 2 years ago committed by GitHub
parent 9a3f468051
commit 191b8081b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      panda
  2. 14
      selfdrive/car/gm/carstate.py
  3. 2
      selfdrive/test/process_replay/ref_commit

@ -1 +1 @@
Subproject commit 1ccdff90c564154489a3394691a4830a4ae19027 Subproject commit 281eb7731b4338fef049977593fdf3315adf09e9

@ -51,12 +51,15 @@ class CarState(CarStateBase):
else: else:
ret.gearShifter = self.parse_gear_shifter(self.shifter_values.get(pt_cp.vl["ECMPRDNL2"]["PRNDL2"], None)) ret.gearShifter = self.parse_gear_shifter(self.shifter_values.get(pt_cp.vl["ECMPRDNL2"]["PRNDL2"], None))
# 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"] ret.brake = pt_cp.vl["ECMAcceleratorPos"]["BrakePedalPos"]
ret.brakePressed = ret.brake >= 8 if self.CP.networkLocation == NetworkLocation.fwdCamera:
ret.brakePressed = pt_cp.vl["ECMEngineStatus"]["BrakePressed"] != 0
else:
# 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 use a conservative brake position threshold
# https://static.nhtsa.gov/odi/tsbs/2017/MC-10137629-9999.pdf
ret.brakePressed = ret.brake >= 8
# Regen braking is braking # Regen braking is braking
if self.CP.transmissionType == TransmissionType.direct: if self.CP.transmissionType == TransmissionType.direct:
@ -154,6 +157,7 @@ class CarState(CarStateBase):
("TractionControlOn", "ESPStatus"), ("TractionControlOn", "ESPStatus"),
("ParkBrake", "VehicleIgnitionAlt"), ("ParkBrake", "VehicleIgnitionAlt"),
("CruiseMainOn", "ECMEngineStatus"), ("CruiseMainOn", "ECMEngineStatus"),
("BrakePressed", "ECMEngineStatus"),
] ]
checks = [ checks = [

@ -1 +1 @@
caa8fb2a046a6c2c186e66af339212a5fae6b7a4 372a67c524342bbf15e22f0caea08d2038973281

Loading…
Cancel
Save