mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-11-02 20:13:53 +08:00
Hyundai wheel capabilities
This commit is contained in:
@@ -11,6 +11,7 @@ class WheelSettingsPolicy:
|
||||
distance_pause_only: bool = True
|
||||
paddle_pause: bool = True
|
||||
runtime_supported: bool = False
|
||||
lkas_button_supported: bool = False
|
||||
|
||||
|
||||
def supports_ioniq6_configuration(cp) -> bool:
|
||||
|
||||
@@ -97,6 +97,23 @@ class TestOffroadConfigurationPages(unittest.TestCase):
|
||||
self.assertTrue(rows[label]['choices'] or rows[label]['step'], (name, label))
|
||||
self.assert_no_car_cache()
|
||||
|
||||
def test_fixed_ioniq6_cruise_buttons_remain_outside_remapping_catalog(self):
|
||||
from openpilot.starpilot.car.hyundai.settings import configuration_wheel_policy
|
||||
cp = self.context.sample().cp
|
||||
policy = configuration_wheel_policy(cp)
|
||||
assert policy is not None
|
||||
self.assertTrue(policy.fixed_cruise_buttons)
|
||||
self.assertFalse(policy.lkas_button_supported)
|
||||
self.params.put('LKASButtonControl', 9, block=True)
|
||||
self.params.put('MainCruiseButtonControl', 10, block=True)
|
||||
labels = {row['label'] for row in self.page('wheel')['rows']}
|
||||
self.assertNotIn('LKAS press', labels)
|
||||
self.assertNotIn('Main cruise press', labels)
|
||||
self.assertIn('Distance long press', labels)
|
||||
self.assertEqual(self.params.get('LKASButtonControl'), 9)
|
||||
self.assertEqual(self.params.get('MainCruiseButtonControl'), 10)
|
||||
self.assert_no_car_cache()
|
||||
|
||||
def test_every_advertised_default_is_accepted_by_its_owner(self):
|
||||
checked = 0
|
||||
for name in sorted(PAGES):
|
||||
|
||||
Reference in New Issue
Block a user