diff --git a/selfdrive/car/gm/carstate.py b/selfdrive/car/gm/carstate.py index ceaf43419bf765..14e14b32086c61 100644 --- a/selfdrive/car/gm/carstate.py +++ b/selfdrive/car/gm/carstate.py @@ -88,7 +88,7 @@ def __init__(self, CP, canbus): K=[[0.12287673], [0.29666309]]) self.v_ego = 0. - def update(self, pt_cp): + def update(self, pt_cp, ch_cp): self.prev_cruise_buttons = self.cruise_buttons self.cruise_buttons = pt_cp.vl["ASCMSteeringButton"]['ACCButtons'] self.prev_lka_button = self.lka_button @@ -173,7 +173,7 @@ def update(self, pt_cp): self.gear_shifter_valid = self.gear_shifter == car.CarState.GearShifter.drive # Update Friction Brakes from Chassis Canbus - #self.frictionBrakesActive = bool(ch_cp.vl["EBCMFrictionBrakeStatus"]["FrictionBrakePressure"] != 0) + self.frictionBrakesActive = bool(ch_cp.vl["EBCMFrictionBrakeStatus"]["FrictionBrakePressure"] != 0) def get_follow_level(self): return self.follow_level diff --git a/selfdrive/car/gm/interface.py b/selfdrive/car/gm/interface.py index f4254e2fbd3e87..13dd2a4e38f719 100755 --- a/selfdrive/car/gm/interface.py +++ b/selfdrive/car/gm/interface.py @@ -229,8 +229,8 @@ def get_params(candidate, fingerprint=gen_empty_fingerprint(), vin="", has_relay # returns a car.CarState def update(self, c, can_strings): self.pt_cp.update_strings(can_strings) - - self.CS.update(self.pt_cp) + self.ch_cp.update_strings(can_strings) + self.CS.update(self.pt_cp, self.ch_cp) # create message ret = car.CarState.new_message()