mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-18 15:23:57 +08:00
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 c564e74666e3a418ef43a77926c8a38a2bf89511.
old-commit-hash: e634afb719
This commit is contained in:
2
opendbc
2
opendbc
Submodule opendbc updated: b3dc569994...296f190000
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user