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) {