Skip torque-only parked review for non-torque steering

This commit is contained in:
firestar5683
2026-11-22 10:52:19 -06:00
parent ec59d25227
commit f36af88b54
3 changed files with 11 additions and 1 deletions
@@ -27,6 +27,8 @@ def baseline_settings(cp, params):
raw, readable = read_saved(params, DOCUMENT_KEY, MAX_DOCUMENT_BYTES)
if not readable:
raise ValueError('Readable selected baseline settings required')
if cp.lateralTuning.which() != 'torque':
raise ValueError('Selected steering tune does not contain torque settings')
tune = cp.lateralTuning.torque
basis = (float(tune.latAccelFactor), float(tune.latAccelOffset), float(tune.friction))
fingerprint = str(cp.carFingerprint)
@@ -190,6 +190,14 @@ class TestFindingAcceptance(unittest.TestCase):
self.assertEqual(self.raw(), before)
self.assertEqual(self.fixture.stored(), pending)
def test_pending_review_without_torque_tuning_is_unavailable(self):
from openpilot.starpilot.flm.review_settings import review_settings
from opendbc.car import structs
cp = structs.CarParams.new_message(**self.cp.to_dict())
cp.lateralTuning.init('pid')
self.assertIsNone(review_settings(cp, self.params))
def test_pending_review_identity_ignores_only_coordinate_acceptance(self):
from openpilot.starpilot.flm.offroad_worker import OffroadWorker
+1 -1
View File
@@ -1 +1 @@
{"protected_inventory_sha256": "54562ec264c59aaa32bfa2b4a490704d301dc81e10bce6e3618c4098e736a18e", "schema_version": 1}
{"protected_inventory_sha256": "524e30225ba25d3a2a76662cf54e6873ee20ffcb4fe05ecbdefe34395b93b2a3", "schema_version": 1}