|
|
|
@ -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) |
|
|
|
|