GM: Add Stock FCW to CarState (#1228)
* GM: Add Stock FCW to CarState * Add Comment
This commit is contained in:
parent
6c68673cfd
commit
70009fed0c
|
@ -124,6 +124,8 @@ class CarState(CarStateBase):
|
|||
ret.cruiseState.standstill = pt_cp.vl["AcceleratorPedal2"]["CruiseState"] == AccState.STANDSTILL
|
||||
if self.CP.networkLocation == NetworkLocation.fwdCamera:
|
||||
ret.cruiseState.speed = cam_cp.vl["ASCMActiveCruiseControlStatus"]["ACCSpeedSetpoint"] * CV.KPH_TO_MS
|
||||
# This FCW signal only works for SDGM cars. CAM cars send FCW on GMLAN but this bit is always 0 for them
|
||||
ret.stockFcw = cam_cp.vl["ASCMActiveCruiseControlStatus"]["FCWAlert"] != 0
|
||||
if self.CP.carFingerprint not in SDGM_CAR:
|
||||
ret.stockAeb = cam_cp.vl["AEBCmd"]["AEBCmdActive"] != 0
|
||||
# openpilot controls nonAdaptive when not pcmCruise
|
||||
|
|
Loading…
Reference in New Issue