GM: fix fault while moving backwards (#26333)

* log signed speed

* bump to master

* need this

* fix

* fix...

* see if this works

* just fault fix (no logging or standstill. tho revisit standstill)

* move

* Revert "move"

This reverts commit c564e74666.
pull/26335/head
Shane Smiskol 3 years ago committed by GitHub
parent 21ac65da22
commit e634afb719
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      opendbc
  2. 2
      selfdrive/car/gm/carstate.py
  3. 5
      selfdrive/car/gm/interface.py

@ -1 +1 @@
Subproject commit b3dc569994fd10e4de04afd650980c51ddfce5e1
Subproject commit 296f190000a2e71408e207ba21a2257cc853ec15

@ -28,6 +28,7 @@ class CarState(CarStateBase):
self.cruise_buttons = pt_cp.vl["ASCMSteeringButton"]["ACCButtons"]
self.buttons_counter = pt_cp.vl["ASCMSteeringButton"]["RollingCounter"]
self.pscm_status = copy.copy(pt_cp.vl["PSCMStatus"])
self.moving_backward = pt_cp.vl["EBCMWheelSpdRear"]["MovingBackward"] != 0
# Variables used for avoiding LKAS faults
self.loopback_lka_steering_cmd_updated = len(loopback_cp.vl_all["ASCMLKASteeringCmd"]["RollingCounter"]) > 0
@ -139,6 +140,7 @@ class CarState(CarStateBase):
("FRWheelSpd", "EBCMWheelSpdFront"),
("RLWheelSpd", "EBCMWheelSpdRear"),
("RRWheelSpd", "EBCMWheelSpdRear"),
("MovingBackward", "EBCMWheelSpdRear"),
("PRNDL2", "ECMPRDNL2"),
("ManualMode", "ECMPRDNL2"),
("LKADriverAppldTrq", "PSCMStatus"),

@ -225,8 +225,9 @@ class CarInterface(CarInterfaceBase):
# Enabling at a standstill with brake is allowed
# TODO: verify 17 Volt can enable for the first time at a stop and allow for all GMs
if ret.vEgo < self.CP.minEnableSpeed and not (ret.standstill and ret.brake >= 20 and
self.CP.networkLocation == NetworkLocation.fwdCamera):
below_min_enable_speed = ret.vEgo < self.CP.minEnableSpeed or self.CS.moving_backward
if below_min_enable_speed and not (ret.standstill and ret.brake >= 20 and
self.CP.networkLocation == NetworkLocation.fwdCamera):
events.add(EventName.belowEngageSpeed)
if ret.cruiseState.standstill:
events.add(EventName.resumeRequired)

Loading…
Cancel
Save