Initialize Turn Assist in the shared Controls test fixture

This commit is contained in:
firestar5683
2026-11-20 15:01:34 -06:00
parent 57135a1f28
commit 212b1d7eef
2 changed files with 7 additions and 1 deletions
@@ -35,6 +35,9 @@ from openpilot.selfdrive.controls.lib.longcontrol import LongControl
from openpilot.common.params import Params
from openpilot.starpilot.lateral.lane_change_preferences import LiveLaneChangePolicy
from openpilot.starpilot.lateral.lane_change_smoothing import LaneChangeSmoother
from openpilot.starpilot.lateral.model_turn_assist import ModelTurnAssist
from openpilot.starpilot.lateral.turn_initiation_preferences import TurnInitiationPreference
from openpilot.starpilot.lateral.turn_unlock import TurnUnlock
def observed_lead(controls):
@@ -102,6 +105,9 @@ def controls_fixture(alpha=False):
saved = TemporaryDirectory()
finalize(controls, saved.cleanup)
controls.params = Params(saved.name)
controls.model_turn_assist = ModelTurnAssist()
controls.turn_unlock = TurnUnlock()
controls.turn_initiation_preferences = TurnInitiationPreference(controls.params)
controls.highway_correction_gain = HighwayCorrectionGain()
controls.highway_smoothing_supported = lateral_supported(controls.CP)
controls.highway_gain = read_gain(controls.params) if controls.highway_smoothing_supported else 1.0
+1 -1
View File
@@ -1 +1 @@
{"protected_inventory_sha256": "34e09c9a6d8f65a18b297c707a109a3c4e2ed76d1b0e8539d44e89d3f24da1d9", "schema_version": 1}
{"protected_inventory_sha256": "6c0f1f635045758c0fb0b8579637edf94ebcfd5f6893fd5cc37266f22628db52", "schema_version": 1}