Align Ford CI fixture typing

This commit is contained in:
Dom
2026-10-22 23:24:20 -05:00
parent 989beaae3c
commit 2fe363a1f8
3 changed files with 5 additions and 3 deletions
@@ -8,6 +8,7 @@ from types import SimpleNamespace
from opendbc.can import CANParser
from opendbc.car import Bus
from opendbc.car.can_definitions import CanData
from unittest.mock import patch
import pytest
@@ -159,7 +160,7 @@ def ford_joined(identity, alpha, hands_free, monkeypatch, record_property):
extras += [('Side_Detect_L_Stat', 2 if host.CP.flags & FordFlags.CANFD else 0, {}),
('Side_Detect_R_Stat', 2 if host.CP.flags & FordFlags.CANFD else 0, {})]
preframes += [native.packer.make_can_msg(message, bus, fields) for message, bus, fields in extras]
state = host.CI.update([(10_000_000_000 + native.tick * 10_000_000, [(addr, data, bus + offset) for addr, data, bus in preframes])])
state = host.CI.update([(10_000_000_000 + native.tick * 10_000_000, [CanData(addr, data, bus + offset) for addr, data, bus in preframes])])
assert not native.safety.get_controls_allowed() and native.safety.aol_get_permission_mask() == 0
assert state.canValid and not state.canTimeout
yield SimpleNamespace(host=host, native=native, safety=native.safety, initial_cp=host.CP.to_dict(),
@@ -1,6 +1,7 @@
"""Both actual Developer panels expose only qualified Ford release opt-in."""
from tempfile import TemporaryDirectory
from types import SimpleNamespace
from typing import Any
from unittest.mock import patch
import pytest
from opendbc.car import gen_empty_fingerprint
@@ -17,7 +18,7 @@ def panel_for(module, cp, params):
ui = SimpleNamespace(CP=cp.as_reader(), params=params, is_release=True, engaged=False, has_longitudinal_control=False,
is_offroad=lambda: True, update_params=lambda: None)
layout = large.DeveloperLayout if module is large else compact.DeveloperLayoutMici
panel = layout.__new__(layout)
panel: Any = layout.__new__(layout)
panel._alpha_long_toggle = Toggle()
panel._alpha_long_toggle.title, panel._alpha_long_toggle.description = 'Alpha Long', 'Existing alpha confirmation'
panel._long_maneuver_toggle = Toggle()
+1 -1
View File
@@ -1 +1 @@
{"protected_inventory_sha256": "53b649eeca854a7437a55e99304597619361bcf9b177854f9307bf6b394c793f", "schema_version": 1}
{"protected_inventory_sha256": "4888f2f073818550bd4d1187934011282f8f6093fb032f1864d72ed0e552ae5f", "schema_version": 1}