|
|
|
@ -4,7 +4,7 @@ from selfdrive.car import apply_toyota_steer_torque_limits, create_gas_intercept |
|
|
|
|
from selfdrive.car.toyota.toyotacan import create_steer_command, create_ui_command, \ |
|
|
|
|
create_accel_command, create_acc_cancel_command, \ |
|
|
|
|
create_fcw_command, create_lta_steer_command |
|
|
|
|
from selfdrive.car.toyota.values import CAR, STATIC_DSU_MSGS, NO_STOP_TIMER_CAR, TSS2_CAR, \ |
|
|
|
|
from selfdrive.car.toyota.values import CAR, STATIC_DSU_MSGS, NO_STOP_TIMER_CAR, \ |
|
|
|
|
MIN_ACC_SPEED, PEDAL_TRANSITION, CarControllerParams |
|
|
|
|
from opendbc.can.packer import CANPacker |
|
|
|
|
VisualAlert = car.CarControl.HUDControl.VisualAlert |
|
|
|
@ -85,7 +85,7 @@ class CarController(): |
|
|
|
|
# LTA mode. Set ret.steerControlType = car.CarParams.SteerControlType.angle and whitelist 0x191 in the panda |
|
|
|
|
if frame % 2 == 0: |
|
|
|
|
can_sends.append(create_steer_command(self.packer, 0, 0, frame // 2)) |
|
|
|
|
can_sends.append(create_lta_steer_command(self.packer, self.torque_sensor_angle_deg, actuators.steeringAngleDeg, apply_steer_req, frame // 2)) |
|
|
|
|
can_sends.append(create_lta_steer_command(self.packer, actuators.steeringAngleDeg, apply_steer_req, frame // 2)) |
|
|
|
|
|
|
|
|
|
# we can spam can to cancel the system even if we are using lat only control |
|
|
|
|
if (frame % 3 == 0 and CS.CP.openpilotLongitudinalControl) or pcm_cancel_cmd: |
|
|
|
|