@ -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 = [