mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-01 19:42:07 +08:00
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> old-commit-hash: 6ce511cc605782c25d45c66b55f859caaf7ce516
This commit is contained in:
+1
-1
Submodule panda updated: 3334dc21f5...1303af2db2
@@ -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
|
||||
Reference in New Issue
Block a user