Skip to content

Commit

Permalink
Adding GM Steering Rate (#495)
Browse files Browse the repository at this point in the history
* adding steering rate

* adding steering rate
  • Loading branch information
CryptoKylan authored and rbiasini committed Jan 9, 2019
1 parent d84e64b commit b78ed77
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions selfdrive/car/gm/carstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ def get_powertrain_can_parser(CP, canbus):
("AcceleratorPedal", "AcceleratorPedal", 0),
("ACCButtons", "ASCMSteeringButton", CruiseButtons.UNPRESS),
("SteeringWheelAngle", "PSCMSteeringAngle", 0),
("SteeringWheelRate", "PSCMSteeringAngle", 0),
("FLWheelSpd", "EBCMWheelSpdFront", 0),
("FRWheelSpd", "EBCMWheelSpdFront", 0),
("RLWheelSpd", "EBCMWheelSpdRear", 0),
Expand Down Expand Up @@ -89,6 +90,7 @@ def update(self, pt_cp):
self.standstill = self.v_ego_raw < 0.01

self.angle_steers = pt_cp.vl["PSCMSteeringAngle"]['SteeringWheelAngle']
self.angle_steers_rate = pt_cp.vl["PSCMSteeringAngle"]['SteeringWheelRate']
self.gear_shifter = parse_gear_shifter(pt_cp.vl["ECMPRDNL"]['PRNDL'])
self.user_brake = pt_cp.vl["EBCMBrakePedalPosition"]['BrakePedalPosition']

Expand Down
1 change: 1 addition & 0 deletions selfdrive/car/gm/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ def update(self, c):

# steering wheel
ret.steeringAngle = self.CS.angle_steers
ret.steeringRate = self.CS.angle_steers_rate

# torque and user override. Driver awareness
# timer resets when the user uses the steering wheel.
Expand Down

0 comments on commit b78ed77

Please sign in to comment.