Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnyhaibin committed Jun 13, 2024
1 parent 9f38196 commit 1a083c2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion selfdrive/car/hyundai/carstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ def update(self, cp, cp_cam):
ret.brakeHoldActive = cp.vl["TCS15"]["AVH_LAMP"] == 2 # 0 OFF, 1 ERROR, 2 ACTIVE, 3 READY
ret.parkingBrake = cp.vl["TCS13"]["PBRAKE_ACT"] == 1
ret.espDisabled = cp.vl["TCS11"]["TCS_PAS"] == 1
ret.accFaulted = cp.vl["TCS13"]["ACCEnable"] != 0 or cp.vl["TCS11"]["ABS_ACT"] != 0 # 0 ACC CONTROL ENABLED, 1-3 ACC CONTROL DISABLED
# TCS13|ACCEnable: 0 ACC CONTROL ENABLED, 1-3 ACC CONTROL DISABLED
# TCS11|ABS_ACT: 1 ABS ACTIVE
ret.accFaulted = cp.vl["TCS13"]["ACCEnable"] != 0 or cp.vl["TCS11"]["ABS_ACT"] != 0

if self.CP.flags & (HyundaiFlags.HYBRID | HyundaiFlags.EV):
if self.CP.flags & HyundaiFlags.HYBRID:
Expand Down

0 comments on commit 1a083c2

Please sign in to comment.