Toyota LTA: show alert when steering angle sensor is initializing (#28717)

* add lockout for this case

* initialized

* angle sensor

* who
pull/28722/head
Shane Smiskol 2 years ago committed by GitHub
parent e85acfa365
commit 1e9f794abe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      selfdrive/car/toyota/interface.py

@ -8,6 +8,7 @@ from selfdrive.car import STD_CARGO_KG, scale_tire_stiffness, get_safety_config
from selfdrive.car.interfaces import CarInterfaceBase
EventName = car.CarEvent.EventName
SteerControlType = car.CarParams.SteerControlType
class CarInterface(CarInterfaceBase):
@ -27,7 +28,7 @@ class CarInterface(CarInterfaceBase):
if candidate in ANGLE_CONTROL_CAR:
ret.dashcamOnly = True
ret.steerControlType = car.CarParams.SteerControlType.angle
ret.steerControlType = SteerControlType.angle
ret.safetyConfigs[0].safetyParam |= Panda.FLAG_TOYOTA_LTA
else:
CarInterfaceBase.configure_torque_tune(candidate, ret.lateralTuning)
@ -259,6 +260,11 @@ class CarInterface(CarInterfaceBase):
# events
events = self.create_common_events(ret)
# Lane Tracing Assist control is unavailable (EPS_STATUS->LTA_STATE=0) until
# the more accurate angle sensor signal is initialized
if self.CP.steerControlType == SteerControlType.angle and not self.CS.accurate_steer_angle_seen:
events.add(EventName.vehicleSensorsInvalid)
if self.CP.openpilotLongitudinalControl:
if ret.cruiseState.standstill and not ret.brakePressed and not self.CP.enableGasInterceptor:
events.add(EventName.resumeRequired)

Loading…
Cancel
Save