move fuzzy fingerprinting out of community features (#21542)

pull/21546/head
Adeeb Shihadeh 4 years ago committed by GitHub
parent e0ed92c03f
commit b4fc208166
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      selfdrive/controls/controlsd.py
  2. 2
      selfdrive/controls/tests/test_startup.py

@ -96,7 +96,7 @@ class Controls:
car_recognized = self.CP.carName != 'mock' car_recognized = self.CP.carName != 'mock'
controller_available = self.CI.CC is not None and not passive and not self.CP.dashcamOnly controller_available = self.CI.CC is not None and not passive and not self.CP.dashcamOnly
community_feature = self.CP.communityFeature or self.CP.fuzzyFingerprint or \ community_feature = self.CP.communityFeature or \
self.CP.fingerprintSource == car.CarParams.FingerprintSource.can self.CP.fingerprintSource == car.CarParams.FingerprintSource.can
community_feature_disallowed = community_feature and (not community_feature_toggle) community_feature_disallowed = community_feature and (not community_feature_toggle)
self.read_only = not car_recognized or not controller_available or \ self.read_only = not car_recognized or not controller_available or \

@ -68,7 +68,7 @@ class TestStartup(unittest.TestCase):
# fuzzy match # fuzzy match
(EventName.startupFuzzyFingerprint, TOYOTA.COROLLA, True, COROLLA_FW_VERSIONS_FUZZY), (EventName.startupFuzzyFingerprint, TOYOTA.COROLLA, True, COROLLA_FW_VERSIONS_FUZZY),
(EventName.communityFeatureDisallowed, TOYOTA.COROLLA, False, COROLLA_FW_VERSIONS_FUZZY), (EventName.startupFuzzyFingerprint, TOYOTA.COROLLA, False, COROLLA_FW_VERSIONS_FUZZY),
]) ])
@with_processes(['controlsd']) @with_processes(['controlsd'])
def test_startup_alert(self, expected_event, car_model, toggle_enabled, fw_versions): def test_startup_alert(self, expected_event, car_model, toggle_enabled, fw_versions):

Loading…
Cancel
Save