|
|
|
@ -2,7 +2,7 @@ |
|
|
|
|
from cereal import car |
|
|
|
|
from selfdrive.config import Conversions as CV |
|
|
|
|
from selfdrive.car.toyota.tunes import LatTunes, LongTunes, set_long_tune, set_lat_tune |
|
|
|
|
from selfdrive.car.toyota.values import Ecu, CAR, ToyotaFlags, TSS2_CAR, NO_DSU_CAR, MIN_ACC_SPEED, EPS_SCALE, CarControllerParams |
|
|
|
|
from selfdrive.car.toyota.values import Ecu, CAR, ToyotaFlags, TSS2_CAR, NO_DSU_CAR, MIN_ACC_SPEED, EPS_SCALE, EV_HYBRID_CAR, CarControllerParams |
|
|
|
|
from selfdrive.car import STD_CARGO_KG, scale_rot_inertia, scale_tire_stiffness, gen_empty_fingerprint, get_safety_config |
|
|
|
|
from selfdrive.car.interfaces import CarInterfaceBase |
|
|
|
|
|
|
|
|
@ -217,7 +217,9 @@ class CarInterface(CarInterfaceBase): |
|
|
|
|
# if the smartDSU is detected, openpilot can send ACC_CMD (and the smartDSU will block it from the DSU) or not (the DSU is "connected") |
|
|
|
|
ret.openpilotLongitudinalControl = smartDsu or ret.enableDsu or candidate in TSS2_CAR |
|
|
|
|
|
|
|
|
|
if 0x245 in fingerprint[0]: |
|
|
|
|
# we can't use the fingerprint to detect this reliably, since |
|
|
|
|
# the EV gas pedal signal can take a couple seconds to appear |
|
|
|
|
if candidate in EV_HYBRID_CAR: |
|
|
|
|
ret.flags |= ToyotaFlags.HYBRID.value |
|
|
|
|
|
|
|
|
|
# min speed to enable ACC. if car can do stop and go, then set enabling speed |
|
|
|
|