mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-07-16 10:22:07 +08:00
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:
+1
-1
Submodule panda updated: 1ccdff90c5...281eb7731b
@@ -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 @@
|
||||
caa8fb2a046a6c2c186e66af339212a5fae6b7a4
|
||||
372a67c524342bbf15e22f0caea08d2038973281
|
||||
|
||||
Reference in New Issue
Block a user