mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-11-05 03:54:04 +08:00
Repair Ford BluePilot startup fixtures and native test loader identity
This commit is contained in:
@@ -5,7 +5,9 @@ import pytest
|
||||
|
||||
from opendbc.car import gen_empty_fingerprint, structs
|
||||
from opendbc.car.ford.interface import CarInterface
|
||||
from opendbc.car.ford.values import CAR
|
||||
from opendbc.car.ford.values import CAR, FordFlags
|
||||
from opendbc.bluepilot_lateral.core.values_ext import FordSafetyFlagsSP
|
||||
from opendbc.bluepilot_lateral.hosts.starpilot.safety_param import BP_SAFETY_PARAM_SHIFT
|
||||
|
||||
|
||||
PROFILES = (
|
||||
@@ -76,6 +78,8 @@ def run_startup(identity, base_word, alpha, release, topology, monkeypatch):
|
||||
initial_word = base_word | int(expected_long)
|
||||
expected_word = initial_word | (256 if topology == "manual" else 0)
|
||||
initial = CarInterface.get_params(identity, fingerprint, [], expected_long, release, False)
|
||||
if not initial.flags & FordFlags.LKA_STEERING:
|
||||
expected_word |= FordSafetyFlagsSP.BP_LATERAL << BP_SAFETY_PARAM_SHIFT
|
||||
initial.carVin = "0" * 17
|
||||
initial.carFw = []
|
||||
admitted = True
|
||||
@@ -88,8 +92,7 @@ def run_startup(identity, base_word, alpha, release, topology, monkeypatch):
|
||||
with OpenpilotPrefix():
|
||||
saved = Params()
|
||||
for key, value in (("OpenpilotEnabledToggle", True), ("AlwaysOnLateral", True),
|
||||
("AlphaLongitudinalEnabled", alpha), ("IsReleaseBranch", release),
|
||||
("FordHumanTurnDetection", False)):
|
||||
("AlphaLongitudinalEnabled", alpha), ("IsReleaseBranch", release)):
|
||||
saved.put_bool(key, value, block=True)
|
||||
observed = (identity, fingerprint, initial.carVin, [], initial.fingerprintSource, True)
|
||||
subscriber = messaging.sub_sock("carParams", timeout=100, conflate=True)
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
{"protected_inventory_sha256": "cd8c615958ada909b930d7ca76d9e24103f34e308a7e716591641759eea12403", "schema_version": 1}
|
||||
{"protected_inventory_sha256": "ec942078f3cfc87d5683b73d47e4c45adea7152ea1ddfa76c49bd4668cbedcd6", "schema_version": 1}
|
||||
|
||||
@@ -690,6 +690,9 @@ def native_provenance():
|
||||
def build_safety_library(release, output):
|
||||
from opendbc.car.structs import CarParams
|
||||
from opendbc.safety.tests.libsafety import libsafety_py
|
||||
alias = "opendbc_repo.opendbc.safety.tests.libsafety.libsafety_py"
|
||||
if sys.modules.setdefault(alias, libsafety_py) is not libsafety_py:
|
||||
raise RuntimeError("Vehicle tests imported multiple native safety loaders")
|
||||
commands = []
|
||||
check_call = subprocess.check_call
|
||||
|
||||
|
||||
Reference in New Issue
Block a user