Skip to content

Commit

Permalink
Finish rename toggle
Browse files Browse the repository at this point in the history
change toggle to torque

Update interface.py

Update settings.cc
  • Loading branch information
Casey Francis committed Jun 22, 2022
1 parent ee2015c commit 677ebc8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions selfdrive/car/toyota/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,16 +136,16 @@ def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=[], disabl
tire_stiffness_factor = 0.7933
ret.mass = 3585. * CV.LB_TO_KG + STD_CARGO_KG # Average between ICE and Hybrid
if Params().get_bool('Torque'):
set_lat_tune(ret.lateralTuning, LatTunes.TORQUE, MAX_LAT_ACCEL=2.4, FRICTION=0.05)
set_lat_tune(ret.lateralTuning, LatTunes.TORQUE, MAX_LAT_ACCEL=2.5, FRICTION=0.06)
else:
set_lat_tune(ret.lateralTuning, LatTunes.PID_D)

# 2019+ Rav4 TSS2 uses two different steering racks and specific tuning seems to be necessary.
# See https://github.com/commaai/openpilot/pull/21429#issuecomment-873652891
for fw in car_fw:
if fw.ecu == "eps" and (fw.fwVersion.startswith(b'\x02') or fw.fwVersion in [b'8965B42181\x00\x00\x00\x00\x00\x00']):
if Params().get_bool('LqrTune'):
set_lat_tune(ret.lateralTuning, LatTunes.TORQUE, MAX_TORQUE=3.3, FRICTION=0.061)
if Params().get_bool('Torque'):
set_lat_tune(ret.lateralTuning, LatTunes.TORQUE, MAX_LAT_ACCEL=3.3, FRICTION=0.061)
else:
set_lat_tune(ret.lateralTuning, LatTunes.PID_I)
break
Expand Down

0 comments on commit 677ebc8

Please sign in to comment.