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
This commit is contained in:
Shane Smiskol
2022-11-08 20:52:35 -08:00
committed by GitHub
parent 9a3f468051
commit 191b8081b2
3 changed files with 11 additions and 7 deletions
+1 -1
Submodule panda updated: 1ccdff90c5...281eb7731b
+9 -5
View File
@@ -51,12 +51,15 @@ class CarState(CarStateBase):
else:
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.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
if self.CP.transmissionType == TransmissionType.direct:
@@ -154,6 +157,7 @@ class CarState(CarStateBase):
("TractionControlOn", "ESPStatus"),
("ParkBrake", "VehicleIgnitionAlt"),
("CruiseMainOn", "ECMEngineStatus"),
("BrakePressed", "ECMEngineStatus"),
]
checks = [
+1 -1
View File
@@ -1 +1 @@
caa8fb2a046a6c2c186e66af339212a5fae6b7a4
372a67c524342bbf15e22f0caea08d2038973281