Skip to content

Commit

Permalink
GM: add support for vehicles with manual parking brakes (#24766)
Browse files Browse the repository at this point in the history
Switch to general park brake signal
  • Loading branch information
JMPZ11 authored Jun 15, 2022
1 parent 7a6f57a commit f8f4337
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions selfdrive/car/gm/carstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def update(self, pt_cp, loopback_cp):
ret.leftBlinker = pt_cp.vl["BCMTurnSignals"]["TurnSignals"] == 1
ret.rightBlinker = pt_cp.vl["BCMTurnSignals"]["TurnSignals"] == 2

ret.parkingBrake = pt_cp.vl["EPBStatus"]["EPBClosed"] == 1
ret.parkingBrake = pt_cp.vl["VehicleIgnitionAlt"]["ParkBrake"] == 1
ret.cruiseState.available = pt_cp.vl["ECMEngineStatus"]["CruiseMainOn"] != 0
ret.espDisabled = pt_cp.vl["ESPStatus"]["TractionControlOn"] != 1
ret.accFaulted = pt_cp.vl["AcceleratorPedal2"]["CruiseState"] == AccState.FAULTED
Expand Down Expand Up @@ -100,7 +100,7 @@ def get_can_parser(CP):
("LKATorqueDelivered", "PSCMStatus"),
("LKATorqueDeliveredStatus", "PSCMStatus"),
("TractionControlOn", "ESPStatus"),
("EPBClosed", "EPBStatus"),
("ParkBrake", "VehicleIgnitionAlt"),
("CruiseMainOn", "ECMEngineStatus"),
]

Expand All @@ -110,7 +110,7 @@ def get_can_parser(CP):
("PSCMStatus", 10),
("ESPStatus", 10),
("BCMDoorBeltStatus", 10),
("EPBStatus", 20),
("VehicleIgnitionAlt", 10),
("EBCMWheelSpdFront", 20),
("EBCMWheelSpdRear", 20),
("AcceleratorPedal2", 33),
Expand Down

0 comments on commit f8f4337

Please sign in to comment.