diff --git a/opendbc/car/toyota/carcontroller.py b/opendbc/car/toyota/carcontroller.py index 4c241996e2..db26f7c47f 100644 --- a/opendbc/car/toyota/carcontroller.py +++ b/opendbc/car/toyota/carcontroller.py @@ -39,10 +39,9 @@ def get_long_tune(CP, params): - kiBP = [0.] if CP.carFingerprint in TSS2_CAR: - kiV = [0.25] - + kiBP = [2., 5.] + kiV = [0.5, 0.25] else: kiBP = [0., 5., 35.] kiV = [3.6, 2.4, 1.5] @@ -218,7 +217,9 @@ def update(self, CC, CS, now_nanos): prev_aego = self.aego.x self.aego.update(a_ego_blended) j_ego = (self.aego.x - prev_aego) / (DT_CTRL * 3) - a_ego_future = a_ego_blended + j_ego * 0.5 + + future_t = float(np.interp(CS.out.vEgo, [2., 5.], [0.25, 0.5])) + a_ego_future = a_ego_blended + j_ego * future_t if CC.longActive: # constantly slowly unwind integral to recover from large temporary errors