diff --git a/cereal b/cereal index de1982c02d..e2868d85ae 160000 --- a/cereal +++ b/cereal @@ -1 +1 @@ -Subproject commit de1982c02de5032c6a213e969817aa72f96c10d9 +Subproject commit e2868d85aed47da9438894cdd04ecf8d3c3ae148 diff --git a/selfdrive/car/honda/interface.py b/selfdrive/car/honda/interface.py index 62dbb24c34..d45401ef9f 100755 --- a/selfdrive/car/honda/interface.py +++ b/selfdrive/car/honda/interface.py @@ -47,7 +47,6 @@ class CarInterface(CarInterfaceBase): ret.openpilotLongitudinalControl = True ret.pcmCruise = not ret.enableGasInterceptor - ret.communityFeature = ret.enableGasInterceptor if candidate == CAR.CRV_5G: ret.enableBsm = 0x12f8bfa7 in fingerprint[0] diff --git a/selfdrive/car/toyota/interface.py b/selfdrive/car/toyota/interface.py index c95aca0b22..022c785e64 100755 --- a/selfdrive/car/toyota/interface.py +++ b/selfdrive/car/toyota/interface.py @@ -238,10 +238,6 @@ class CarInterface(CarInterfaceBase): # to a negative value, so it won't matter. ret.minEnableSpeed = -1. if (stop_and_go or ret.enableGasInterceptor) else MIN_ACC_SPEED - # removing the DSU disables AEB and it's considered a community maintained feature - # intercepting the DSU is a community feature since it requires unofficial hardware - ret.communityFeature = ret.enableGasInterceptor or ret.enableDsu or smartDsu - if ret.enableGasInterceptor: set_long_tune(ret.longitudinalTuning, LongTunes.PEDAL) elif candidate in TSS2_CAR: diff --git a/selfdrive/common/params.cc b/selfdrive/common/params.cc index ef19f44914..eab476a74b 100644 --- a/selfdrive/common/params.cc +++ b/selfdrive/common/params.cc @@ -91,7 +91,6 @@ std::unordered_map keys = { {"CarParams", CLEAR_ON_MANAGER_START | CLEAR_ON_IGNITION_ON}, {"CarParamsCache", CLEAR_ON_MANAGER_START}, {"CarVin", CLEAR_ON_MANAGER_START | CLEAR_ON_IGNITION_ON}, - {"CommunityFeaturesToggle", PERSISTENT}, {"CompletedTrainingVersion", PERSISTENT}, {"ControlsReady", CLEAR_ON_MANAGER_START | CLEAR_ON_IGNITION_ON}, {"CurrentRoute", CLEAR_ON_MANAGER_START | CLEAR_ON_IGNITION_ON}, diff --git a/selfdrive/controls/controlsd.py b/selfdrive/controls/controlsd.py index 01754a37ed..b3fa47a0e2 100755 --- a/selfdrive/controls/controlsd.py +++ b/selfdrive/controls/controlsd.py @@ -100,7 +100,6 @@ class Controls: # read params self.is_metric = params.get_bool("IsMetric") self.is_ldw_enabled = params.get_bool("IsLdwEnabled") - community_feature_toggle = params.get_bool("CommunityFeaturesToggle") openpilot_enabled_toggle = params.get_bool("OpenpilotEnabledToggle") passive = params.get_bool("Passive") or not openpilot_enabled_toggle @@ -110,11 +109,7 @@ class Controls: car_recognized = self.CP.carName != 'mock' controller_available = self.CI.CC is not None and not passive and not self.CP.dashcamOnly - community_feature = self.CP.communityFeature or \ - self.CP.fingerprintSource == car.CarParams.FingerprintSource.can - community_feature_disallowed = community_feature and (not community_feature_toggle) - self.read_only = not car_recognized or not controller_available or \ - self.CP.dashcamOnly or community_feature_disallowed + self.read_only = not car_recognized or not controller_available or self.CP.dashcamOnly if self.read_only: safety_config = car.CarParams.SafetyConfig.new_message() safety_config.safetyModel = car.CarParams.SafetyModel.noOutput @@ -169,8 +164,6 @@ class Controls: if not sounds_available: self.events.add(EventName.soundsUnavailable, static=True) - if community_feature_disallowed and car_recognized and not self.CP.dashcamOnly: - self.events.add(EventName.communityFeatureDisallowed, static=True) if not car_recognized: self.events.add(EventName.carUnrecognized, static=True) if len(self.CP.carFw) > 0: diff --git a/selfdrive/controls/lib/events.py b/selfdrive/controls/lib/events.py index 4d693b0fbd..ea670311b6 100644 --- a/selfdrive/controls/lib/events.py +++ b/selfdrive/controls/lib/events.py @@ -316,14 +316,6 @@ EVENTS: Dict[int, Dict[str, Union[Alert, AlertCallbackType]]] = { #ET.PERMANENT: ImmediateDisableAlert("openpilot failed to cancel cruise"), }, - # Some features or cars are marked as community features. If openpilot - # detects the use of a community feature it switches to dashcam mode - # until these features are allowed using a toggle in settings. - EventName.communityFeatureDisallowed: { - ET.PERMANENT: NormalPermanentAlert("openpilot Unavailable", - "Enable Community Features in Settings"), - }, - # openpilot doesn't recognize the car. This switches openpilot into a # read-only mode. This can be solved by adding your fingerprint. # See https://github.com/commaai/openpilot/wiki/Fingerprinting for more information diff --git a/selfdrive/controls/tests/test_startup.py b/selfdrive/controls/tests/test_startup.py index 658adf499e..9d13453045 100755 --- a/selfdrive/controls/tests/test_startup.py +++ b/selfdrive/controls/tests/test_startup.py @@ -42,31 +42,27 @@ class TestStartup(unittest.TestCase): # TODO: test EventName.startup for release branches # officially supported car - (EventName.startupMaster, TOYOTA.COROLLA, False, COROLLA_FW_VERSIONS), - (EventName.startupMaster, TOYOTA.COROLLA, True, COROLLA_FW_VERSIONS), - - # DSU unplugged - (EventName.startupMaster, TOYOTA.COROLLA, True, COROLLA_FW_VERSIONS_NO_DSU), - (EventName.communityFeatureDisallowed, TOYOTA.COROLLA, False, COROLLA_FW_VERSIONS_NO_DSU), + (EventName.startupMaster, TOYOTA.COROLLA, COROLLA_FW_VERSIONS), + (EventName.startupMaster, TOYOTA.COROLLA, COROLLA_FW_VERSIONS), # dashcamOnly car - (EventName.startupNoControl, MAZDA.CX5, True, CX5_FW_VERSIONS), - (EventName.startupNoControl, MAZDA.CX5, False, CX5_FW_VERSIONS), + (EventName.startupNoControl, MAZDA.CX5, CX5_FW_VERSIONS), + (EventName.startupNoControl, MAZDA.CX5, CX5_FW_VERSIONS), # unrecognized car with no fw - (EventName.startupNoFw, None, True, None), - (EventName.startupNoFw, None, False, None), + (EventName.startupNoFw, None, None), + (EventName.startupNoFw, None, None), # unrecognized car - (EventName.startupNoCar, None, True, COROLLA_FW_VERSIONS[:1]), - (EventName.startupNoCar, None, False, COROLLA_FW_VERSIONS[:1]), + (EventName.startupNoCar, None, COROLLA_FW_VERSIONS[:1]), + (EventName.startupNoCar, None, COROLLA_FW_VERSIONS[:1]), # fuzzy match - (EventName.startupMaster, TOYOTA.COROLLA, True, COROLLA_FW_VERSIONS_FUZZY), - (EventName.startupMaster, TOYOTA.COROLLA, False, COROLLA_FW_VERSIONS_FUZZY), + (EventName.startupMaster, TOYOTA.COROLLA, COROLLA_FW_VERSIONS_FUZZY), + (EventName.startupMaster, TOYOTA.COROLLA, COROLLA_FW_VERSIONS_FUZZY), ]) @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, fw_versions): # TODO: this should be done without any real sockets controls_sock = messaging.sub_sock("controlsState") @@ -76,7 +72,6 @@ class TestStartup(unittest.TestCase): params.clear_all() params.put_bool("Passive", False) params.put_bool("OpenpilotEnabledToggle", True) - params.put_bool("CommunityFeaturesToggle", toggle_enabled) # Build capnn version of FW array if fw_versions is not None: diff --git a/selfdrive/test/helpers.py b/selfdrive/test/helpers.py index 0bb475c929..5abc0d964f 100644 --- a/selfdrive/test/helpers.py +++ b/selfdrive/test/helpers.py @@ -13,7 +13,6 @@ def set_params_enabled(): params.put("HasAcceptedTerms", terms_version) params.put("CompletedTrainingVersion", training_version) params.put_bool("OpenpilotEnabledToggle", True) - params.put_bool("CommunityFeaturesToggle", True) params.put_bool("Passive", False) diff --git a/selfdrive/test/longitudinal_maneuvers/test_longitudinal.py b/selfdrive/test/longitudinal_maneuvers/test_longitudinal.py index 35b9f32e68..60aaeb724d 100755 --- a/selfdrive/test/longitudinal_maneuvers/test_longitudinal.py +++ b/selfdrive/test/longitudinal_maneuvers/test_longitudinal.py @@ -120,7 +120,6 @@ class LongitudinalControl(unittest.TestCase): params.clear_all() params.put_bool("Passive", bool(os.getenv("PASSIVE"))) params.put_bool("OpenpilotEnabledToggle", True) - params.put_bool("CommunityFeaturesToggle", True) # hack def test_longitudinal_setup(self): diff --git a/selfdrive/test/process_replay/process_replay.py b/selfdrive/test/process_replay/process_replay.py index 0296e76ece..40ce5365ae 100755 --- a/selfdrive/test/process_replay/process_replay.py +++ b/selfdrive/test/process_replay/process_replay.py @@ -347,7 +347,6 @@ def setup_env(simulation=False): params.clear_all() params.put_bool("OpenpilotEnabledToggle", True) params.put_bool("Passive", False) - params.put_bool("CommunityFeaturesToggle", True) os.environ["NO_RADAR_SLEEP"] = "1" os.environ["REPLAY"] = "1" diff --git a/selfdrive/test/process_replay/ref_commit b/selfdrive/test/process_replay/ref_commit index c3fa542c0b..629ef65e6f 100644 --- a/selfdrive/test/process_replay/ref_commit +++ b/selfdrive/test/process_replay/ref_commit @@ -1 +1 @@ -4a64d5122c408e2ba759d531df2d6ab7b4d7508a \ No newline at end of file +7689a98899787bcaeafc088ac9a256172faf250a \ No newline at end of file diff --git a/selfdrive/test/process_replay/regen.py b/selfdrive/test/process_replay/regen.py index 9dd90a04b5..16ee5e9a28 100755 --- a/selfdrive/test/process_replay/regen.py +++ b/selfdrive/test/process_replay/regen.py @@ -174,8 +174,6 @@ def regen_segment(lr, frs=None, outdir=FAKEDATA): params.clear_all() params.put_bool("Passive", False) params.put_bool("OpenpilotEnabledToggle", True) - params.put_bool("CommunityFeaturesToggle", True) - params.put_bool("CommunityFeaturesToggle", True) os.environ["LOG_ROOT"] = outdir os.environ["REPLAY"] = "1" diff --git a/selfdrive/ui/qt/offroad/settings.cc b/selfdrive/ui/qt/offroad/settings.cc index 8e89899957..288633cc7f 100644 --- a/selfdrive/ui/qt/offroad/settings.cc +++ b/selfdrive/ui/qt/offroad/settings.cc @@ -53,12 +53,6 @@ TogglesPanel::TogglesPanel(SettingsWindow *parent) : ListWidget(parent) { "Display speed in km/h instead of mph.", "../assets/offroad/icon_metric.png", }, - { - "CommunityFeaturesToggle", - "Enable Community Features", - "Use features, such as community supported hardware, from the open source community that are not maintained or supported by comma.ai and have not been confirmed to meet the standard safety model. Be extra cautious when using these features", - "../assets/offroad/icon_shell.png", - }, { "RecordFront", "Record and Upload Driver Camera",