From 361f692d53334e30e0210039fb1fb2be855d6319 Mon Sep 17 00:00:00 2001 From: firestar5683 <168790843+firestar5683@users.noreply.github.com> Date: Mon, 13 Jul 2026 10:07:16 -0500 Subject: [PATCH] lagathy --- selfdrive/locationd/test/test_lagd.py | 16 +++++++++++- .../components/tools/device_settings.js | 25 +++++++++++-------- 2 files changed, 29 insertions(+), 12 deletions(-) diff --git a/selfdrive/locationd/test/test_lagd.py b/selfdrive/locationd/test/test_lagd.py index 7076cd5d1..c44019ec5 100644 --- a/selfdrive/locationd/test/test_lagd.py +++ b/selfdrive/locationd/test/test_lagd.py @@ -1,6 +1,8 @@ import random -import numpy as np import time +from types import SimpleNamespace + +import numpy as np import pytest from cereal import messaging, log, car @@ -44,6 +46,18 @@ def process_messages(estimator, lag_frames, n_frames, vego=20.0, rejection_thres class TestLagd: + def test_manual_delay_uses_exact_configured_value(self): + mocked_CP = car.CarParams(steerActuatorDelay=0.11) + estimator = LateralLagEstimator(mocked_CP, DT) + estimator.starpilot_toggles = SimpleNamespace( + use_custom_steerActuatorDelay=True, + steerActuatorDelay=0.30, + ) + + msg = estimator.get_msg(True) + + assert msg.liveDelay.lateralDelay == pytest.approx(0.30) + def test_read_saved_params(self): params = Params() diff --git a/starpilot/system/the_galaxy/assets/components/tools/device_settings.js b/starpilot/system/the_galaxy/assets/components/tools/device_settings.js index 2f2967199..ac128b751 100644 --- a/starpilot/system/the_galaxy/assets/components/tools/device_settings.js +++ b/starpilot/system/the_galaxy/assets/components/tools/device_settings.js @@ -1232,8 +1232,8 @@ function renderSettingRow(p) { const isColor = p.ui_type === "color" const isGroup = isGroupParam(p) const isChild = p.parent_key ? "ds-child-modifier" : "" - const lockReason = getSettingLockReason(p) - const isLocked = lockReason !== "" + const lockReason = () => getSettingLockReason(p) + const isLocked = () => lockReason() !== "" const ftmParamStatus = getFtmParamStatus(p.key) const ftmTrialSummary = p.key === "AdvancedLateralTune" ? getFtmTrialSummary() : null let rowControl = "" @@ -1259,7 +1259,7 @@ function renderSettingRow(p) {
${formatSliderValue(bounds.min, String(bounds.step), p.precision, p.key)} to ${formatSliderValue(bounds.max, String(bounds.step), p.precision, p.key)} @@ -1273,7 +1273,7 @@ function renderSettingRow(p) { min="${bounds.min}" max="${bounds.max}" step="${bounds.step}" - disabled="${() => isLocked || updating}" + disabled="${() => isLocked() || updating}" value="${() => formatNumericForInput(resolveCurrentNumericValue(p, numericBounds(p)), precision)}" @keydown="${(e) => { if (e.key !== "Enter") return @@ -1282,17 +1282,17 @@ function renderSettingRow(p) { }}" />
` })()} @@ -1304,7 +1304,7 @@ function renderSettingRow(p) { class="ds-select" id="ds-${p.key}" data-endpoint="${p.options_endpoint || ""}" - disabled="${() => isLocked}" + disabled="${() => isLocked()}" @change="${() => updateParam(p.key, "dropdown")}"> @@ -1316,12 +1316,12 @@ function renderSettingRow(p) { type="color" class="ds-color" id="ds-${p.key}" - disabled="${() => isLocked}" + disabled="${() => isLocked()}" value="${() => resolveColorInputValue(p)}" @change="${() => updateParam(p.key, "color")}" /> ` @@ -1361,7 +1361,10 @@ function renderSettingRow(p) { ${ftmParamStatus ? html`Currently overridden by FTM` : ""} ${p.description ? html`
${p.description}
` : ""} - ${lockReason ? html`
Locked: ${lockReason}
` : ""} + ${() => { + const reason = lockReason() + return reason ? html`
Locked: ${reason}
` : "" + }} ${ftmParamStatus ? html`
Effective now: ${formatFtmValue(p, ftmParamStatus.effectiveValue)}.