Revert second-Panda Hyundai HDA2 stock cruise fallback

This commit is contained in:
firestar5683
2026-11-23 22:46:29 -06:00
parent e59fa4930a
commit 8a9f7a084c
3 changed files with 3 additions and 27 deletions
@@ -304,13 +304,11 @@ class CarInterface(CarInterfaceBase):
ret.radarUnavailable = not stinger_2022_radar_available(fingerprint)
else:
ret.radarUnavailable = radar_start not in fingerprint[1] or Bus.radar not in DBC[ret.carFingerprint]
from opendbc.car.hyundai.torque_ev_startup import CARS as torque_ev_cars, topology_owned as torque_ev_topology
from opendbc.car.hyundai.torque_ev_startup import topology_owned as torque_ev_topology
if torque_ev_topology(ret):
# The prepared owner alone promotes the saved developer choice before CI construction.
ret.alphaLongitudinalAvailable = not is_release
alpha_long = False
elif candidate in torque_ev_cars and ret.flags & HyundaiFlags.CANFD_LKA_STEER_MSG and CAN.offset != 0:
ret.alphaLongitudinalAvailable = False
from opendbc.car.hyundai.legacy_long_aol import CARS as legacy_long_cars
ret.openpilotLongitudinalControl = alpha_long and ret.alphaLongitudinalAvailable and candidate not in legacy_long_cars
if (candidate in (CAR.KIA_CARNIVAL_2025, CAR.KIA_CARNIVAL_HEV_4TH_GEN) and
@@ -5,7 +5,7 @@ from types import SimpleNamespace
from unittest.mock import patch
import pytest
from opendbc.car import gen_empty_fingerprint, make_tester_present_msg, structs
from opendbc.car import gen_empty_fingerprint, make_tester_present_msg
from opendbc.car.hyundai.interface import CarInterface
from opendbc.car.hyundai.values import CAR, HyundaiFlags
from opendbc.car.hyundai.ecu_startup import Outcome
@@ -196,28 +196,6 @@ def test_unowned_topologies_preserve_factory_output(car, variant, alpha):
assert not required(actual)
@pytest.mark.parametrize("alt", [False, True])
def test_second_panda_hda2_starts_with_factory_cruise(alt):
from openpilot.starpilot.vehicle_startup import VehicleStartupOwner
from opendbc.car.hyundai.values import HyundaiSafetyFlags
fp = gen_empty_fingerprint()
fp[6].update({0x110: 32, 0x362: 32} if alt else {0x50: 16, 0x2A4: 24})
fp[5].update({0x1CF: 8, 0x35: 32, 0xA0: 24, 0xEA: 24, 0x1A0: 32})
fw = [structs.CarParams.CarFw.new_message(ecu=structs.CarParams.Ecu.adas)]
cp = CarInterface.get_params(CAR.HYUNDAI_IONIQ_5, fp, fw, True, False, False)
stock = CarInterface.get_params(CAR.HYUNDAI_IONIQ_5, fp, fw, False, False, False)
sent = []
startup = VehicleStartupOwner()
cp = startup.prepare(cp, CarInterface, (list, sent.extend), requested=True, admission=lambda: True)
startup.configure(CarInterface(cp))
assert cp.to_dict() == stock.to_dict()
assert len(cp.safetyConfigs) == 2
assert cp.pcmCruise and not cp.openpilotLongitudinalControl and not cp.alphaLongitudinalAvailable
assert not any(config.safetyParam & HyundaiSafetyFlags.LONG for config in cp.safetyConfigs)
assert sent == []
@pytest.mark.parametrize("reply,accepted", [(None, True), (b"\x68\x03", True), (b"\x7f\x28\x22", False), (b"\x68\x01", False)])
def test_real_isotp_decoder_classifies_suppressed_command(stock, reply, accepted):
import time
+1 -1
View File
@@ -1 +1 @@
{"protected_inventory_sha256": "12bb56bff6e9d6c2cebc5969cf048722d31a1c61aaae853a57bf5bf6b5131545", "schema_version": 1}
{"protected_inventory_sha256": "5602b0f7f4a8059ffb07dbce31e32c7ea776c96a6868dc1072d1ad669097ac05", "schema_version": 1}