diff --git a/cereal b/cereal index 0891fd758d..bbcc8eea73 160000 --- a/cereal +++ b/cereal @@ -1 +1 @@ -Subproject commit 0891fd758d77b616994e85a1a06b18ea3a48e3db +Subproject commit bbcc8eea73fdf3d0cbb0cc925d47379dd33ba0b8 diff --git a/selfdrive/car/car_helpers.py b/selfdrive/car/car_helpers.py index c0c4f4bf03..f2e1b37e38 100644 --- a/selfdrive/car/car_helpers.py +++ b/selfdrive/car/car_helpers.py @@ -13,7 +13,7 @@ from cereal import car EventName = car.CarEvent.EventName -def get_startup_event(car_recognized, controller_available, fuzzy_fingerprint, fw_seen): +def get_startup_event(car_recognized, controller_available, fw_seen): if comma_remote and tested_branch: event = EventName.startup else: @@ -26,8 +26,6 @@ def get_startup_event(car_recognized, controller_available, fuzzy_fingerprint, f event = EventName.startupNoFw elif car_recognized and not controller_available: event = EventName.startupNoControl - elif car_recognized and fuzzy_fingerprint: - event = EventName.startupFuzzyFingerprint return event diff --git a/selfdrive/controls/controlsd.py b/selfdrive/controls/controlsd.py index a619d7f9c7..3acd1837c4 100755 --- a/selfdrive/controls/controlsd.py +++ b/selfdrive/controls/controlsd.py @@ -153,8 +153,7 @@ class Controls: # TODO: no longer necessary, aside from process replay self.sm['liveParameters'].valid = True - self.startup_event = get_startup_event(car_recognized, controller_available, self.CP.fuzzyFingerprint, - len(self.CP.carFw) > 0) + self.startup_event = get_startup_event(car_recognized, controller_available, len(self.CP.carFw) > 0) if not sounds_available: self.events.add(EventName.soundsUnavailable, static=True) diff --git a/selfdrive/controls/lib/events.py b/selfdrive/controls/lib/events.py index f08803212e..af4fcd3ed1 100644 --- a/selfdrive/controls/lib/events.py +++ b/selfdrive/controls/lib/events.py @@ -219,14 +219,6 @@ def wrong_car_mode_alert(CP: car.CarParams, sm: messaging.SubMaster, metric: boo return NoEntryAlert(text, duration_hud_alert=0.) -def startup_fuzzy_fingerprint_alert(CP: car.CarParams, sm: messaging.SubMaster, metric: bool) -> Alert: - return Alert( - "WARNING: No Exact Match on Car Model", - f"Closest Match: {CP.carFingerprint.title()[:40]}", - AlertStatus.userPrompt, AlertSize.mid, - Priority.LOWER, VisualAlert.none, AudibleAlert.none, 0., 0., 10.) - - def joystick_alert(CP: car.CarParams, sm: messaging.SubMaster, metric: bool) -> Alert: axes = sm['testJoystick'].axes gb, steer = list(axes)[:2] if len(axes) else (0., 0.) @@ -291,18 +283,6 @@ EVENTS: Dict[int, Dict[str, Union[Alert, Callable[[Any, messaging.SubMaster, boo Priority.LOWER, VisualAlert.none, AudibleAlert.none, 0., 0., 10.), }, - # openpilot uses the version strings from various ECUs to detect the correct car model. - # Usually all ECUs are recognized and an exact match to a car model can be made. Sometimes - # one or two ECUs have unrecognized versions, but the others are present in the database. - # If openpilot is confident about the match to a car model, it fingerprints anyway. - # In this case an alert is thrown since there is a small chance the wrong car was detected - # and the user should pay extra attention. - # This alert can be prevented by adding all ECU firmware version to openpilot: - # https://github.com/commaai/openpilot/wiki/Fingerprinting - EventName.startupFuzzyFingerprint: { - ET.PERMANENT: startup_fuzzy_fingerprint_alert, - }, - EventName.startupNoFw: { ET.PERMANENT: Alert( "Car Unrecognized", diff --git a/selfdrive/controls/tests/test_startup.py b/selfdrive/controls/tests/test_startup.py index 96a22f8723..b35aa106d8 100755 --- a/selfdrive/controls/tests/test_startup.py +++ b/selfdrive/controls/tests/test_startup.py @@ -67,8 +67,8 @@ class TestStartup(unittest.TestCase): (EventName.startupNoCar, None, False, COROLLA_FW_VERSIONS[:1]), # fuzzy match - (EventName.startupFuzzyFingerprint, TOYOTA.COROLLA, True, COROLLA_FW_VERSIONS_FUZZY), - (EventName.startupFuzzyFingerprint, TOYOTA.COROLLA, False, COROLLA_FW_VERSIONS_FUZZY), + (EventName.startupMaster, TOYOTA.COROLLA, True, COROLLA_FW_VERSIONS_FUZZY), + (EventName.startupMaster, TOYOTA.COROLLA, False, COROLLA_FW_VERSIONS_FUZZY), ]) @with_processes(['controlsd']) def test_startup_alert(self, expected_event, car_model, toggle_enabled, fw_versions):