From d179f02b2e02419659bd8ed11bada2222c6430ad Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Fri, 11 Apr 2025 14:39:32 -0700 Subject: [PATCH] rename param --- common/params_keys.h | 2 +- selfdrive/car/card.py | 2 +- selfdrive/selfdrived/selfdrived.py | 2 +- selfdrive/test/process_replay/process_replay.py | 4 ++-- selfdrive/ui/qt/offroad/developer_panel.cc | 4 ++-- selfdrive/ui/qt/util.cc | 2 +- tools/sim/bridge/common.py | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/common/params_keys.h b/common/params_keys.h index e630792357..ca779a5b5c 100644 --- a/common/params_keys.h +++ b/common/params_keys.h @@ -34,7 +34,7 @@ inline static std::unordered_map keys = { {"DoReboot", CLEAR_ON_MANAGER_START}, {"DoShutdown", CLEAR_ON_MANAGER_START}, {"DoUninstall", CLEAR_ON_MANAGER_START}, - {"ExperimentalLongitudinalEnabled", PERSISTENT | DEVELOPMENT_ONLY}, + {"AlphaLongitudinalEnabled", PERSISTENT | DEVELOPMENT_ONLY}, {"ExperimentalMode", PERSISTENT}, {"ExperimentalModeConfirmed", PERSISTENT}, {"FirmwareQueryDone", CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION}, diff --git a/selfdrive/car/card.py b/selfdrive/car/card.py index fbdcb3b5a9..378543164c 100755 --- a/selfdrive/car/card.py +++ b/selfdrive/car/card.py @@ -89,7 +89,7 @@ class Car: if len(can.can) > 0: break - alpha_long_allowed = self.params.get_bool("ExperimentalLongitudinalEnabled") + alpha_long_allowed = self.params.get_bool("AlphaLongitudinalEnabled") num_pandas = len(messaging.recv_one_retry(self.sm.sock['pandaStates']).pandaStates) cached_params = None diff --git a/selfdrive/selfdrived/selfdrived.py b/selfdrive/selfdrived/selfdrived.py index a6ab6a85f1..face7dab29 100755 --- a/selfdrive/selfdrived/selfdrived.py +++ b/selfdrive/selfdrived/selfdrived.py @@ -90,7 +90,7 @@ class SelfdriveD: # cleanup old params if not self.CP.alphaLongitudinalAvailable: - self.params.remove("ExperimentalLongitudinalEnabled") + self.params.remove("AlphaLongitudinalEnabled") if not self.CP.openpilotLongitudinalControl: self.params.remove("ExperimentalMode") diff --git a/selfdrive/test/process_replay/process_replay.py b/selfdrive/test/process_replay/process_replay.py index 9715e48615..6139846322 100755 --- a/selfdrive/test/process_replay/process_replay.py +++ b/selfdrive/test/process_replay/process_replay.py @@ -363,7 +363,7 @@ def get_car_params_callback(rc, pm, msgs, fingerprint): with car.CarParams.from_bytes(cached_params_raw) as _cached_params: cached_params = _cached_params - CP = get_car(*can_callbacks, lambda obd: None, Params().get_bool("ExperimentalLongitudinalEnabled"), cached_params=cached_params).CP + CP = get_car(*can_callbacks, lambda obd: None, Params().get_bool("AlphaLongitudinalEnabled"), cached_params=cached_params).CP if not params.get_bool("DisengageOnAccelerator"): CP.alternativeExperience |= ALTERNATIVE_EXPERIENCE.DISABLE_DISENGAGE_ON_GAS @@ -777,7 +777,7 @@ def generate_params_config(lr=None, CP=None, fingerprint=None, custom_params=Non params_dict["CarParamsCache"] = CP.as_builder().to_bytes() if CP.openpilotLongitudinalControl: - params_dict["ExperimentalLongitudinalEnabled"] = True + params_dict["AlphaLongitudinalEnabled"] = True if CP.notCar: params_dict["JoystickDebugMode"] = True diff --git a/selfdrive/ui/qt/offroad/developer_panel.cc b/selfdrive/ui/qt/offroad/developer_panel.cc index d7053c7796..a095228da2 100644 --- a/selfdrive/ui/qt/offroad/developer_panel.cc +++ b/selfdrive/ui/qt/offroad/developer_panel.cc @@ -26,7 +26,7 @@ DeveloperPanel::DeveloperPanel(SettingsWindow *parent) : ListWidget(parent) { addItem(longManeuverToggle); experimentalLongitudinalToggle = new ParamControl( - "ExperimentalLongitudinalEnabled", + "AlphaLongitudinalEnabled", tr("openpilot Longitudinal Control (Alpha)"), QString("%1

%2") .arg(tr("WARNING: openpilot longitudinal control is in alpha for this car and will disable Automatic Emergency Braking (AEB).")) @@ -69,7 +69,7 @@ void DeveloperPanel::updateToggles(bool _offroad) { cereal::CarParams::Reader CP = cmsg.getRoot(); if (!CP.getAlphaLongitudinalAvailable() || is_release) { - params.remove("ExperimentalLongitudinalEnabled"); + params.remove("AlphaLongitudinalEnabled"); experimentalLongitudinalToggle->setEnabled(false); } diff --git a/selfdrive/ui/qt/util.cc b/selfdrive/ui/qt/util.cc index 9b8ca60dff..ff381fe39c 100644 --- a/selfdrive/ui/qt/util.cc +++ b/selfdrive/ui/qt/util.cc @@ -194,7 +194,7 @@ bool hasLongitudinalControl(const cereal::CarParams::Reader &car_params) { // Using the experimental longitudinal toggle, returns whether longitudinal control // will be active without needing a restart of openpilot return car_params.getAlphaLongitudinalAvailable() - ? Params().getBool("ExperimentalLongitudinalEnabled") + ? Params().getBool("AlphaLongitudinalEnabled") : car_params.getOpenpilotLongitudinalControl(); } diff --git a/tools/sim/bridge/common.py b/tools/sim/bridge/common.py index bf3be5193d..69dec173ca 100644 --- a/tools/sim/bridge/common.py +++ b/tools/sim/bridge/common.py @@ -40,7 +40,7 @@ class SimulatorBridge(ABC): def __init__(self, dual_camera, high_quality): set_params_enabled() self.params = Params() - self.params.put_bool("ExperimentalLongitudinalEnabled", True) + self.params.put_bool("AlphaLongitudinalEnabled", True) self.rk = Ratekeeper(100, None)