remove community features toggle (#23214)
* remove community features toggle * bump cereal * little more * update refspull/23582/head
parent
a4fefdcb94
commit
3e9cb7fa12
2
cereal
2
cereal
|
@ -1 +1 @@
|
|||
Subproject commit de1982c02de5032c6a213e969817aa72f96c10d9
|
||||
Subproject commit e2868d85aed47da9438894cdd04ecf8d3c3ae148
|
|
@ -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]
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -91,7 +91,6 @@ std::unordered_map<std::string, uint32_t> 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},
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -1 +1 @@
|
|||
4a64d5122c408e2ba759d531df2d6ab7b4d7508a
|
||||
7689a98899787bcaeafc088ac9a256172faf250a
|
|
@ -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"
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue