Tesla: steerWarning on EPS error (#22834)

pull/22833/head
Robbe Derks 4 years ago committed by GitHub
parent 53e095343d
commit fee8ec74f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      selfdrive/car/tesla/carstate.py

@ -43,7 +43,7 @@ class CarState(CarStateBase):
ret.steeringTorque = -cp.vl["EPAS_sysStatus"]["EPAS_torsionBarTorque"]
ret.steeringPressed = (self.hands_on_level > 0)
ret.steerError = steer_status == "EAC_FAULT"
ret.steerWarning = self.steer_warning in ["EAC_ERROR_MAX_SPEED", "EAC_ERROR_MIN_SPEED", "EAC_ERROR_TMP_FAULT", "SNA"] # TODO: not sure if this list is complete
ret.steerWarning = self.steer_warning != "EAC_ERROR_IDLE"
# Cruise state
cruise_state = self.can_define.dv["DI_state"]["DI_cruiseState"].get(int(cp.vl["DI_state"]["DI_cruiseState"]), None)

Loading…
Cancel
Save