mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-10-28 00:53:45 +08:00
Qualify Subaru RELEASE AVH guard and ordinary engagement
This commit is contained in:
@@ -114,3 +114,26 @@ class TestSubaruAvhDiscovery(unittest.TestCase):
|
||||
'alt_gear', 'alt_gas', 'engine', 'main_gear'):
|
||||
with self.subTest(fault=fault):
|
||||
test_native_refusals(fault)
|
||||
|
||||
|
||||
def test_explicit_release_blocks_avh_and_preserves_stock_aol():
|
||||
from opendbc.safety.tests.test_subaru_stock_aol import TestSubaruStockAol
|
||||
|
||||
original = libsafety_py.libpath
|
||||
try:
|
||||
libsafety_py.load(libsafety_py._build_libsafety(release=True))
|
||||
assert libsafety_py.libsafety.set_safety_hooks(structs.CarParams.SafetyModel.allOutput, 0) != 0
|
||||
for param in (1169, 1425):
|
||||
for ae in (0, 32):
|
||||
test_exact_pair_debug_only_and_status_never_tx(param, ae)
|
||||
# RELEASE must retain normal engagement and lateral-only permission after
|
||||
# rejecting the optional DEBUG AVH words, including both Legacy bases.
|
||||
case = TestSubaruStockAol()
|
||||
for param in (145, 401):
|
||||
case.configure(param)
|
||||
case.arm()
|
||||
case.safety.aol_set_host_request(3)
|
||||
assert case.safety.aol_get_permission_mask() == 1
|
||||
assert case.feed(main=False) == 0
|
||||
finally:
|
||||
libsafety_py.load(original)
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
{"protected_inventory_sha256": "461764647a55c7de9da88172eba75d01ff214e0de95fe9f805940797c7cc63f4", "schema_version": 1}
|
||||
{"protected_inventory_sha256": "4e3eefcc8319778d0158f10e442920761f14272888ed5d9bcae27b1ff3a3058d", "schema_version": 1}
|
||||
|
||||
Reference in New Issue
Block a user