Toyota: rename LTA torque wind down signal (#30603)

* bump

* rename

* bump
pull/30606/head
Shane Smiskol 1 year ago committed by GitHub
parent 10eb70daf7
commit 3fed87dbb7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      opendbc
  2. 2
      panda
  3. 8
      selfdrive/car/toyota/carcontroller.py
  4. 4
      selfdrive/car/toyota/toyotacan.py

@ -1 +1 @@
Subproject commit ed3af3da1b7d52aed910f22cc5540e31f92ba254
Subproject commit 5b0c73977f1428700d0344d52874a90a4c5168fb

@ -1 +1 @@
Subproject commit 892ca5a0f19c07a4786373e360027ab6ec57f723
Subproject commit ea78657bef236c6a74b44549e541caf1d7fee618

@ -88,15 +88,15 @@ class CarController:
# STEERING_LTA does not seem to allow more rate by sending faster, and may wind up easier
if self.frame % 2 == 0 and self.CP.carFingerprint in TSS2_CAR:
lta_active = lat_active and self.CP.steerControlType == SteerControlType.angle
# cut steering torque with SETME_X64 when either EPS torque or driver torque is above
# cut steering torque with TORQUE_WIND_DOWN when either EPS torque or driver torque is above
# the threshold, to limit max lateral acceleration and for driver torque blending respectively.
full_torque_condition = (abs(CS.out.steeringTorqueEps) < self.params.STEER_MAX and
abs(CS.out.steeringTorque) < MAX_LTA_DRIVER_TORQUE_ALLOWANCE)
# SETME_X64 at 0 ramps down torque at roughly the max down rate of 1500 units/sec
setme_x64 = 100 if lta_active and full_torque_condition else 0
# TORQUE_WIND_DOWN at 0 ramps down torque at roughly the max down rate of 1500 units/sec
torque_wind_down = 100 if lta_active and full_torque_condition else 0
can_sends.append(toyotacan.create_lta_steer_command(self.packer, self.CP.steerControlType, self.last_angle,
lta_active, self.frame // 2, setme_x64))
lta_active, self.frame // 2, torque_wind_down))
# *** gas and brake ***
if self.CP.enableGasInterceptor and CC.longActive:

@ -14,7 +14,7 @@ def create_steer_command(packer, steer, steer_req):
return packer.make_can_msg("STEERING_LKA", 0, values)
def create_lta_steer_command(packer, steer_control_type, steer_angle, steer_req, frame, setme_x64):
def create_lta_steer_command(packer, steer_control_type, steer_angle, steer_req, frame, torque_wind_down):
"""Creates a CAN message for the Toyota LTA Steer Command."""
values = {
@ -23,7 +23,7 @@ def create_lta_steer_command(packer, steer_control_type, steer_angle, steer_req,
# 1 for TSS 2.5 cars, 3 for TSS 2.0. Send based on whether we're using LTA for lateral control
"SETME_X3": 1 if steer_control_type == SteerControlType.angle else 3,
"PERCENTAGE": 100,
"SETME_X64": setme_x64,
"TORQUE_WIND_DOWN": torque_wind_down,
"ANGLE": 0,
"STEER_ANGLE_CMD": steer_angle,
"STEER_REQUEST": steer_req,

Loading…
Cancel
Save