Skip to content

Commit

Permalink
Toyota: lower hybrid longitudinal actuator delay (#1553)
Browse files Browse the repository at this point in the history
* lower hybrid delay

* better
  • Loading branch information
sshane authored Dec 3, 2024
1 parent 6afe699 commit 651be58
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion opendbc/car/toyota/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, experime
found_ecus = [fw.ecu for fw in car_fw]
ret.enableDsu = len(found_ecus) > 0 and Ecu.dsu not in found_ecus and candidate not in (NO_DSU_CAR | UNSUPPORTED_DSU_CAR)

if candidate in (CAR.LEXUS_ES_TSS2,) and Ecu.hybrid not in found_ecus:
if Ecu.hybrid in found_ecus:
ret.flags |= ToyotaFlags.HYBRID.value

if candidate in (CAR.LEXUS_ES_TSS2,) and not (ret.flags & ToyotaFlags.HYBRID.value):
ret.flags |= ToyotaFlags.RAISED_ACCEL_LIMIT.value

if candidate == CAR.TOYOTA_PRIUS:
Expand Down Expand Up @@ -138,6 +141,10 @@ def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, experime
ret.vEgoStarting = 0.25
ret.stoppingDecelRate = 0.3 # reach stopping target smoothly

# Hybrids have much quicker longitudinal actuator response
if ret.flags & ToyotaFlags.HYBRID.value:
ret.longitudinalActuatorDelay = 0.05

return ret

@staticmethod
Expand Down

0 comments on commit 651be58

Please sign in to comment.