rename param

pull/35011/head
Shane Smiskol 2 weeks ago
parent f1f6c339d0
commit d179f02b2e
  1. 2
      common/params_keys.h
  2. 2
      selfdrive/car/card.py
  3. 2
      selfdrive/selfdrived/selfdrived.py
  4. 4
      selfdrive/test/process_replay/process_replay.py
  5. 4
      selfdrive/ui/qt/offroad/developer_panel.cc
  6. 2
      selfdrive/ui/qt/util.cc
  7. 2
      tools/sim/bridge/common.py

@ -34,7 +34,7 @@ inline static std::unordered_map<std::string, uint32_t> 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},

@ -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

@ -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")

@ -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

@ -26,7 +26,7 @@ DeveloperPanel::DeveloperPanel(SettingsWindow *parent) : ListWidget(parent) {
addItem(longManeuverToggle);
experimentalLongitudinalToggle = new ParamControl(
"ExperimentalLongitudinalEnabled",
"AlphaLongitudinalEnabled",
tr("openpilot Longitudinal Control (Alpha)"),
QString("<b>%1</b><br><br>%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<cereal::CarParams>();
if (!CP.getAlphaLongitudinalAvailable() || is_release) {
params.remove("ExperimentalLongitudinalEnabled");
params.remove("AlphaLongitudinalEnabled");
experimentalLongitudinalToggle->setEnabled(false);
}

@ -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();
}

@ -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)

Loading…
Cancel
Save