Skip to content

Commit

Permalink
Rdm128 patch 1 (commaai#252)
Browse files Browse the repository at this point in the history
* Enable GM - FrictionBrake icon for Kegman Spin

* Update interface.py
  • Loading branch information
rdm128 authored and kegman committed Dec 23, 2019
1 parent 6e9e3c8 commit 18d9d01
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions selfdrive/car/gm/carstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
4 changes: 2 additions & 2 deletions selfdrive/car/gm/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 18d9d01

Please sign in to comment.