diff --git a/selfdrive/car/toyota/interface.py b/selfdrive/car/toyota/interface.py index 9debe33cf1..ae0359841d 100644 --- a/selfdrive/car/toyota/interface.py +++ b/selfdrive/car/toyota/interface.py @@ -224,6 +224,8 @@ class CarInterface(CarInterfaceBase): if ret.steerControlType == car.CarParams.SteerControlType.angle: ret.safetyConfigs[0].safetyParam |= Panda.FLAG_TOYOTA_LTA + ret.steerActuatorDelay = 0.0 # + 0.2 + ret.lateralTuning.init('pid') ret.lateralTuning.pid.kiBP = [0.0] ret.lateralTuning.pid.kpBP = [0.0] diff --git a/selfdrive/car/toyota/toyotacan.py b/selfdrive/car/toyota/toyotacan.py index b42801c1a9..8d065f7910 100644 --- a/selfdrive/car/toyota/toyotacan.py +++ b/selfdrive/car/toyota/toyotacan.py @@ -34,11 +34,13 @@ def create_lta_steer_command(packer, apply_steer, steer_req, limit_torque, op_pa # ramps to 0 smoothly then back on falling edge of STEER_REQUEST if BIT isn't 1 # stock system sometimes uses this signal to wind down torque # TODO: figure out why 99 is so much less torque than 100 - "SETME_X64": 99 if limit_torque else 100, + # "SETME_X64": 99 if limit_torque else 100, + "SETME_X64": op_params.get("SETME_X64"), # TODO: need to understand this better, it's always 1.5-2x higher than angle cmd # TODO: revisit on 2023 RAV4 - "ANGLE": op_params.get("ANGLE"), + # "ANGLE": op_params.get("ANGLE"), + "ANGLE": 0 if abs(apply_steer) < 10 else 10 if apply_steer > 0 else -10, # seems to just be desired angle cmd # TODO: does this have offset on cars where accurate steering angle signal has offset?