mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-06-29 18:42:07 +08:00
Toyota LTA: show alert when steering angle sensor is initializing (#28717)
* add lockout for this case * initialized * angle sensor * who old-commit-hash: 1e9f794abe89a6eca2ad12416d8341450c7ce1f5
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user