diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 30051b466b..34a7f7aed0 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -5,8 +5,8 @@ on: workflow_dispatch: env: - DAYS_BEFORE_PR_CLOSE: 2 - DAYS_BEFORE_PR_STALE: 9 + DAYS_BEFORE_PR_CLOSE: 7 + DAYS_BEFORE_PR_STALE: 60 jobs: stale: diff --git a/opendbc/car/hyundai/fingerprints.py b/opendbc/car/hyundai/fingerprints.py index 86c1d87bc5..256441f70c 100644 --- a/opendbc/car/hyundai/fingerprints.py +++ b/opendbc/car/hyundai/fingerprints.py @@ -637,6 +637,7 @@ b'\xf1\x00OS MDPS C 1.00 1.04 56310/K4550 4OEDC104', b'\xf1\x00OS MDPS C 1.00 1.04 56310K4000\x00 4OEDC104', b'\xf1\x00OS MDPS C 1.00 1.04 56310K4050\x00 4OEDC104', + b'\xf1\x00OS MDPS C 1.00 1.05 56310K4000\x00 4OEDC105', ], (Ecu.fwdRadar, 0x7d0, None): [ b'\xf1\x00OSev SCC F-CUP 1.00 1.00 99110-K4000 ', diff --git a/opendbc/car/toyota/carcontroller.py b/opendbc/car/toyota/carcontroller.py index 70a83ac2bb..d56f318266 100644 --- a/opendbc/car/toyota/carcontroller.py +++ b/opendbc/car/toyota/carcontroller.py @@ -21,7 +21,7 @@ # The up limit allows the brakes/gas to unwind quickly leaving a stop, # the down limit roughly matches the rate of ACCEL_NET, reducing PCM compensation windup -ACCEL_WINDUP_LIMIT = 6.0 * DT_CTRL * 3 # m/s^2 / frame +ACCEL_WINDUP_LIMIT = 4.0 * DT_CTRL * 3 # m/s^2 / frame ACCEL_WINDDOWN_LIMIT = -4.0 * DT_CTRL * 3 # m/s^2 / frame # LKA limits @@ -360,9 +360,9 @@ def update(self, CC, CS, now_nanos): # Along with rate limiting positive jerk above, this greatly improves gas response time # Consider the net acceleration request that the PCM should be applying (pitch included) net_acceleration_request_min = min(actuators.accel + accel_due_to_pitch, net_acceleration_request) - if net_acceleration_request_min < 0.1 or stopping or not CC.longActive: + if net_acceleration_request_min < 0.2 or stopping or not CC.longActive: self.permit_braking = True - elif net_acceleration_request_min > 0.2: + elif net_acceleration_request_min > 0.3: self.permit_braking = False pcm_accel_cmd = clip(pcm_accel_cmd, self.params.ACCEL_MIN, self.params.ACCEL_MAX) diff --git a/opendbc/car/toyota/interface.py b/opendbc/car/toyota/interface.py index e9f370c4de..0ae5eb16ef 100644 --- a/opendbc/car/toyota/interface.py +++ b/opendbc/car/toyota/interface.py @@ -61,7 +61,10 @@ def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, experime ret.enableDsu = len(found_ecus) > 0 and Ecu.dsu not in found_ecus and candidate not in (NO_DSU_CAR | UNSUPPORTED_DSU_CAR) \ and not (ret.flags & ToyotaFlags.SMART_DSU) and not (ret.flags & ToyotaFlags.DSU_BYPASS.value) - if Params().get_bool("AccelMethodSwitch") == True: # and 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 Params().get_bool("AccelMethodSwitch") == True: # and 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: @@ -154,9 +157,6 @@ def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, experime if not ret.openpilotLongitudinalControl: ret.safetyConfigs[0].safetyParam |= Panda.FLAG_TOYOTA_STOCK_LONGITUDINAL - if Ecu.hybrid in found_ecus: #ハイブリッド判定法 - ret.flags |= ToyotaFlags.HYBRID.value - # min speed to enable ACC. if car can do stop and go, then set enabling speed # to a negative value, so it won't matter. ret.minEnableSpeed = -1. if stop_and_go else MIN_ACC_SPEED @@ -170,6 +170,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