Skip to content

Commit

Permalink
setup steerFaultTemp
Browse files Browse the repository at this point in the history
  • Loading branch information
dkiiv committed Jul 22, 2024
1 parent 30bf3fc commit 40a1d39
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion selfdrive/car/volkswagen/carcontroller.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def update(self, CC, CS, ext_bus, now_nanos, frogpilot_variables):
# 8 = standby
# 6 = active
# 4 = activatable, entry request signal
if CC.latActive and not CS.PLA_driverCancel:
if CC.latActive:
self.PLA_status = 6 if self.PLA_entryCounter >= 11 else 4
self.PLA_entryCounter += 1 if self.PLA_entryCounter <= 11 else self.PLA_entryCounter
else:
Expand Down
4 changes: 1 addition & 3 deletions selfdrive/car/volkswagen/carstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ def __init__(self, CP):
self.esp_hold_confirmation = False
self.upscale_lead_car_signal = False
self.eps_stock_values = False
self.PLA_driverCancel = False

def create_button_events(self, pt_cp, buttons):
button_events = []
Expand Down Expand Up @@ -181,8 +180,7 @@ def update_pq(self, pt_cp, cam_cp, ext_cp, trans_type, frogpilot_variables):
ret.steeringPressed = abs(ret.steeringTorque) > self.CCP.STEER_DRIVER_ALLOWANCE
ret.yawRate = pt_cp.vl["Bremse_5"]["Giergeschwindigkeit"] * (1, -1)[int(pt_cp.vl["Bremse_5"]["Vorzeichen_der_Giergeschwindigk"])] * CV.DEG_TO_RAD
hca_status = self.CCP.hca_status_values.get(pt_cp.vl["Lenkhilfe_2"]["LH2_Sta_HCA"])
self.PLA_driverCancel = True if pt_cp.vl["Lenkhilfe_2"]["LH2_PLA_Abbr"] == 2 else False
ret.steerFaultTemporary, ret.steerFaultPermanent = self.update_hca_state(hca_status)
ret.steerFaultTemporary = True if pt_cp.vl["Lenkhilfe_2"]["LH2_PLA_Abbr"] == 2 else False

# Update gas, brakes, and gearshift.
ret.gas = pt_cp.vl["Motor_3"]["Fahrpedal_Rohsignal"] / 100.0
Expand Down

0 comments on commit 40a1d39

Please sign in to comment.