IQ.Pilot Release Commit @ 27f668a

This commit is contained in:
IQ.Lvbs CI [bot]
2026-09-03 18:17:35 -05:00
parent 7745f48100
commit 1b2f28290b
69 changed files with 728 additions and 193 deletions

View File

@@ -63,6 +63,11 @@ def resolve_model_name(params, keys) -> str:
from iqpilot.selfdrive.iqmodeld.egpu_model import DEFAULT_EGPU_MODEL, resolve_egpu_model
resolved = resolve_egpu_model(params, allow_refresh=False)
return resolved["key"] if resolved else DEFAULT_EGPU_MODEL
if params.get_bool("IQEmacSmallModel"):
from iqpilot.selfdrive.iqmodeld.models.helpers import get_active_bundle
bundle = get_active_bundle(params)
if bundle is not None and (bundle.internalName or bundle.displayName):
return bundle.internalName or bundle.displayName
name = params.get("IQEmacModel") or b"lebrowski"
return name.decode() if isinstance(name, bytes) else name
@@ -168,7 +173,7 @@ def _patch_and_send(pm: PubMaster, payload: dict, frame_drop_perc: float, select
if mismatch is None:
mismatch = source_lag > 0
big = payload.get("source") in BIG_SOURCES
big = bool(payload.get("big", payload.get("source") in BIG_SOURCES))
model_msg = log_from_bytes(msgs["modelV2"]).as_builder()
if mismatch:
model_msg.modelV2.frameId = target

View File

@@ -272,6 +272,23 @@ class TestChannelContract:
assert sent["modelV2"].modelV2.frameDropPerc == 0.0
assert sent["cameraOdometry"].valid
def test_selector_big_flag_follows_payload_then_source(self):
from iqpilot.selfdrive.iqmodeld.modeld_selector import _patch_and_send
sent = {}
class PM:
def send(self, service, msg):
sent[service] = msg
payload = make_big_channel_payload(42, True, 0.03, 25.0, self._real_msgs())
_patch_and_send(PM(), payload, frame_drop_perc=0.0, selector_dropped=0, target=42, source_lag=0)
assert sent["modelV2"].modelV2.big and sent["drivingModelData"].drivingModelData.big
small_on_mac = {**make_big_channel_payload(43, True, 0.03, 25.0, self._real_msgs()), "source": "mac_big", "big": False}
_patch_and_send(PM(), small_on_mac, frame_drop_perc=0.0, selector_dropped=0, target=43, source_lag=0)
assert not sent["modelV2"].modelV2.big and not sent["drivingModelData"].drivingModelData.big
def test_selector_lag_patches_frame_id(self):
from iqpilot.selfdrive.iqmodeld.modeld_selector import _patch_and_send