From 483dcfbec4af8ea3c7e6f4518fdcffe82709d315 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Sat, 8 Jul 2023 05:49:03 -0700 Subject: [PATCH] Toyota LTA: prevent high driver torque fault (#28850) LTA also suffers from this fault old-commit-hash: 54ca26ab267f12cf4714b0d7251731b1c008c4e3 --- selfdrive/car/toyota/carcontroller.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/selfdrive/car/toyota/carcontroller.py b/selfdrive/car/toyota/carcontroller.py index 995af1727..fa9a42ee1 100644 --- a/selfdrive/car/toyota/carcontroller.py +++ b/selfdrive/car/toyota/carcontroller.py @@ -81,7 +81,7 @@ class CarController: # Angular rate limit based on speed apply_angle = apply_std_steer_angle_limits(apply_angle, self.last_angle, CS.out.vEgo, self.params) - if not CC.latActive: + if not lat_active: apply_angle = CS.out.steeringAngleDeg + CS.out.steeringAngleOffsetDeg self.last_angle = clip(apply_angle, -MAX_STEER_ANGLE, MAX_STEER_ANGLE) @@ -93,7 +93,7 @@ class CarController: # on consecutive messages can_sends.append(create_steer_command(self.packer, apply_steer, apply_steer_req)) if self.frame % 2 == 0 and self.CP.carFingerprint in TSS2_CAR: - lta_active = CC.latActive and self.CP.steerControlType == SteerControlType.angle + lta_active = lat_active and self.CP.steerControlType == SteerControlType.angle can_sends.append(create_lta_steer_command(self.packer, self.last_angle, lta_active, self.frame // 2)) # *** gas and brake ***