From a99a55ce2bbeb0ee5c3cee86f1bb4b3a6070ce49 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Tue, 6 Apr 2021 17:13:33 -0700 Subject: [PATCH] Send LTA msg on TSS2+ Toyotas (#19731) * send blank lta msg on tss2+ * bump panda --- panda | 2 +- selfdrive/car/toyota/carcontroller.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/panda b/panda index c416419c..7d9fdd11 160000 --- a/panda +++ b/panda @@ -1 +1 @@ -Subproject commit c416419c162c3ac9f52ff1868d6d691c2a57a0ce +Subproject commit 7d9fdd1108ae1c8136a527d1369d25bb890783fb diff --git a/selfdrive/car/toyota/carcontroller.py b/selfdrive/car/toyota/carcontroller.py index 7152aa73..c961288a 100644 --- a/selfdrive/car/toyota/carcontroller.py +++ b/selfdrive/car/toyota/carcontroller.py @@ -3,8 +3,8 @@ from common.numpy_fast import clip from selfdrive.car import apply_toyota_steer_torque_limits, create_gas_command, make_can_msg from selfdrive.car.toyota.toyotacan import create_steer_command, create_ui_command, \ create_accel_command, create_acc_cancel_command, \ - create_fcw_command -from selfdrive.car.toyota.values import Ecu, CAR, STATIC_MSGS, NO_STOP_TIMER_CAR, CarControllerParams + create_fcw_command, create_lta_steer_command +from selfdrive.car.toyota.values import Ecu, CAR, STATIC_MSGS, NO_STOP_TIMER_CAR, TSS2_CAR, CarControllerParams from opendbc.can.packer import CANPacker VisualAlert = car.CarControl.HUDControl.VisualAlert @@ -99,6 +99,8 @@ class CarController(): # on consecutive messages if Ecu.fwdCamera in self.fake_ecus: can_sends.append(create_steer_command(self.packer, apply_steer, apply_steer_req, frame)) + if frame % 2 == 0 and CS.CP.carFingerprint in TSS2_CAR: + can_sends.append(create_lta_steer_command(self.packer, 0, 0, frame // 2)) # LTA mode. Set ret.steerControlType = car.CarParams.SteerControlType.angle and whitelist 0x191 in the panda # if frame % 2 == 0: