diff --git a/openpilot/starpilot/flm/manual_coordinates.py b/openpilot/starpilot/flm/manual_coordinates.py index 2a144620ad..8a4488c4aa 100644 --- a/openpilot/starpilot/flm/manual_coordinates.py +++ b/openpilot/starpilot/flm/manual_coordinates.py @@ -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) diff --git a/openpilot/starpilot/galaxy/tests/test_flm_acceptance.py b/openpilot/starpilot/galaxy/tests/test_flm_acceptance.py index 460b732444..a8cd56621c 100644 --- a/openpilot/starpilot/galaxy/tests/test_flm_acceptance.py +++ b/openpilot/starpilot/galaxy/tests/test_flm_acceptance.py @@ -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 diff --git a/prebuilt.json b/prebuilt.json index 927533e20f..beaf9deee9 100644 --- a/prebuilt.json +++ b/prebuilt.json @@ -1 +1 @@ -{"protected_inventory_sha256": "54562ec264c59aaa32bfa2b4a490704d301dc81e10bce6e3618c4098e736a18e", "schema_version": 1} +{"protected_inventory_sha256": "524e30225ba25d3a2a76662cf54e6873ee20ffcb4fe05ecbdefe34395b93b2a3", "schema_version": 1}