%2")
+ .arg(tr("WARNING: openpilot longitudinal control is in alpha for this car and will disable Automatic Emergency Braking (AEB)."))
+ .arg(tr("On this car, openpilot defaults to the car's built-in ACC instead of openpilot's longitudinal control. "
+ "Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha.")),
+ "../assets/offroad/icon_speed_limit.png"
+ );
+ experimentalLongitudinalToggle->setConfirmation(true, false);
+ QObject::connect(experimentalLongitudinalToggle, &ParamControl::toggleFlipped, [=]() {
+ updateToggles(offroad);
+ });
+ addItem(experimentalLongitudinalToggle);
+
// Joystick and longitudinal maneuvers should be hidden on release branches
is_release = params.getBool("IsReleaseBranch");
@@ -34,18 +49,40 @@ DeveloperPanel::DeveloperPanel(SettingsWindow *parent) : ListWidget(parent) {
void DeveloperPanel::updateToggles(bool _offroad) {
for (auto btn : findChildren()) {
btn->setVisible(!is_release);
- btn->setEnabled(_offroad);
+
+ /*
+ * experimentalLongitudinalToggle should be toggelable when:
+ * - visible, and
+ * - during onroad & offroad states
+ */
+ if (btn != experimentalLongitudinalToggle) {
+ btn->setEnabled(_offroad);
+ }
}
- // longManeuverToggle should not be toggleable if the car don't have longitudinal control
+ // longManeuverToggle and experimentalLongitudinalToggle should not be toggleable if the car does not have longitudinal control
auto cp_bytes = params.get("CarParamsPersistent");
if (!cp_bytes.empty()) {
AlignedBuffer aligned_buf;
capnp::FlatArrayMessageReader cmsg(aligned_buf.align(cp_bytes.data(), cp_bytes.size()));
cereal::CarParams::Reader CP = cmsg.getRoot();
+
+ if (!CP.getExperimentalLongitudinalAvailable() || is_release) {
+ params.remove("ExperimentalLongitudinalEnabled");
+ experimentalLongitudinalToggle->setEnabled(false);
+ }
+
+ /*
+ * experimentalLongitudinalToggle should be visible when:
+ * - is not a release branch, and
+ * - the car supports experimental longitudinal control (alpha)
+ */
+ experimentalLongitudinalToggle->setVisible(CP.getExperimentalLongitudinalAvailable() && !is_release);
+
longManeuverToggle->setEnabled(hasLongitudinalControl(CP) && _offroad);
} else {
longManeuverToggle->setEnabled(false);
+ experimentalLongitudinalToggle->setVisible(false);
}
offroad = _offroad;
diff --git a/selfdrive/ui/qt/offroad/developer_panel.h b/selfdrive/ui/qt/offroad/developer_panel.h
index fe38612e57..3d963ef4ae 100644
--- a/selfdrive/ui/qt/offroad/developer_panel.h
+++ b/selfdrive/ui/qt/offroad/developer_panel.h
@@ -12,6 +12,7 @@ private:
Params params;
ParamControl* joystickToggle;
ParamControl* longManeuverToggle;
+ ParamControl* experimentalLongitudinalToggle;
bool is_release;
bool offroad;
diff --git a/selfdrive/ui/qt/offroad/settings.cc b/selfdrive/ui/qt/offroad/settings.cc
index 20d21d0dd6..b24849eb48 100644
--- a/selfdrive/ui/qt/offroad/settings.cc
+++ b/selfdrive/ui/qt/offroad/settings.cc
@@ -24,15 +24,6 @@ TogglesPanel::TogglesPanel(SettingsWindow *parent) : ListWidget(parent) {
tr("Use the openpilot system for adaptive cruise control and lane keep driver assistance. Your attention is required at all times to use this feature. Changing this setting takes effect when the car is powered off."),
"../assets/img_chffr_wheel.png",
},
- {
- "ExperimentalLongitudinalEnabled",
- 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)."))
- .arg(tr("On this car, openpilot defaults to the car's built-in ACC instead of openpilot's longitudinal control. "
- "Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha.")),
- "../assets/offroad/icon_speed_limit.png",
- },
{
"ExperimentalMode",
tr("Experimental Mode"),
@@ -101,11 +92,6 @@ TogglesPanel::TogglesPanel(SettingsWindow *parent) : ListWidget(parent) {
// Toggles with confirmation dialogs
toggles["ExperimentalMode"]->setActiveIcon("../assets/img_experimental.svg");
toggles["ExperimentalMode"]->setConfirmation(true, true);
- toggles["ExperimentalLongitudinalEnabled"]->setConfirmation(true, false);
-
- connect(toggles["ExperimentalLongitudinalEnabled"], &ToggleControl::toggleFlipped, [=]() {
- updateToggles();
- });
}
void TogglesPanel::updateState(const UIState &s) {
@@ -130,7 +116,6 @@ void TogglesPanel::showEvent(QShowEvent *event) {
void TogglesPanel::updateToggles() {
auto experimental_mode_toggle = toggles["ExperimentalMode"];
- auto op_long_toggle = toggles["ExperimentalLongitudinalEnabled"];
const QString e2e_description = QString("%1 "
"
%2
"
"%3 "
@@ -151,10 +136,6 @@ void TogglesPanel::updateToggles() {
capnp::FlatArrayMessageReader cmsg(aligned_buf.align(cp_bytes.data(), cp_bytes.size()));
cereal::CarParams::Reader CP = cmsg.getRoot();
- if (!CP.getExperimentalLongitudinalAvailable() || is_release) {
- params.remove("ExperimentalLongitudinalEnabled");
- }
- op_long_toggle->setVisible(CP.getExperimentalLongitudinalAvailable() && !is_release);
if (hasLongitudinalControl(CP)) {
// normal description and toggle
experimental_mode_toggle->setEnabled(true);
@@ -183,7 +164,6 @@ void TogglesPanel::updateToggles() {
experimental_mode_toggle->refresh();
} else {
experimental_mode_toggle->setDescription(e2e_description);
- op_long_toggle->setVisible(false);
}
}
diff --git a/selfdrive/ui/translations/main_ar.ts b/selfdrive/ui/translations/main_ar.ts
index 01cc699487..6fc8ce18d6 100644
--- a/selfdrive/ui/translations/main_ar.ts
+++ b/selfdrive/ui/translations/main_ar.ts
@@ -135,10 +135,6 @@
On this car, openpilot defaults to the car's built-in ACC instead of openpilot's longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha.في هذه السيارة يعمل openpilot افتراضياً بالشكل المدمج في التحكم التكيفي في السرعة بدلاً من التحكم الطولي. قم بتمكين هذا الخيار من أجل الانتقال إلى التحكم الطولي. يوصى بتمكين الوضع التجريبي عند استخدام وضع التحكم الطولي ألفا من openpilot.
-
- openpilot longitudinal control may come in a future update.
- قد يتم الحصول على التحكم الطولي في openpilot في عمليات التحديث المستقبلية.
- DevicePanel
diff --git a/selfdrive/ui/translations/main_de.ts b/selfdrive/ui/translations/main_de.ts
index 2b9b7c4707..566a3f63b6 100644
--- a/selfdrive/ui/translations/main_de.ts
+++ b/selfdrive/ui/translations/main_de.ts
@@ -135,10 +135,6 @@
On this car, openpilot defaults to the car's built-in ACC instead of openpilot's longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha.
-
- openpilot longitudinal control may come in a future update.
-
- DevicePanel
diff --git a/selfdrive/ui/translations/main_es.ts b/selfdrive/ui/translations/main_es.ts
index d481a536ec..32295132a8 100644
--- a/selfdrive/ui/translations/main_es.ts
+++ b/selfdrive/ui/translations/main_es.ts
@@ -135,10 +135,6 @@
On this car, openpilot defaults to the car's built-in ACC instead of openpilot's longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha.En este automóvil, openpilot se configura de manera predeterminada con el Autocrucero Adaptativo (ACC) incorporado en el automóvil en lugar del control longitudinal de openpilot. Habilita esta opción para cambiar al control longitudinal de openpilot. Se recomienda activar el modo experimental al habilitar el control longitudinal de openpilot (aún en fase experimental).
-
- openpilot longitudinal control may come in a future update.
- El control longitudinal de openpilot podrá llegar en futuras actualizaciones.
- DevicePanel
diff --git a/selfdrive/ui/translations/main_fr.ts b/selfdrive/ui/translations/main_fr.ts
index cd50258cb9..e532f56911 100644
--- a/selfdrive/ui/translations/main_fr.ts
+++ b/selfdrive/ui/translations/main_fr.ts
@@ -135,10 +135,6 @@
On this car, openpilot defaults to the car's built-in ACC instead of openpilot's longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha.Sur cette voiture, openpilot utilise par défaut le régulateur de vitesse adaptatif intégré à la voiture plutôt que le contrôle longitudinal d'openpilot. Activez ceci pour passer au contrôle longitudinal openpilot. Il est recommandé d'activer le mode expérimental lors de l'activation du contrôle longitudinal openpilot alpha.
-
- openpilot longitudinal control may come in a future update.
- Le contrôle longitudinal openpilot pourrait être disponible dans une future mise à jour.
- DevicePanel
diff --git a/selfdrive/ui/translations/main_ja.ts b/selfdrive/ui/translations/main_ja.ts
index 7234d3877c..d40867b7d1 100644
--- a/selfdrive/ui/translations/main_ja.ts
+++ b/selfdrive/ui/translations/main_ja.ts
@@ -135,10 +135,6 @@
On this car, openpilot defaults to the car's built-in ACC instead of openpilot's longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha.この車では、openpilotは車両内蔵のACC(アダプティブクルーズコントロール)をデフォルトとして使用し、openpilotのアクセル制御は無効化されています。アクセル制御をopenpilotに切り替えるにはこの設定を有効にしてください。また同時にExperimentalモードを推奨します。
-
- openpilot longitudinal control may come in a future update.
- openpilotのアクセル制御は、将来のアップデートで利用できる可能性があります。
- DevicePanel
diff --git a/selfdrive/ui/translations/main_ko.ts b/selfdrive/ui/translations/main_ko.ts
index b916835fdf..8fd4bb2e49 100644
--- a/selfdrive/ui/translations/main_ko.ts
+++ b/selfdrive/ui/translations/main_ko.ts
@@ -135,10 +135,6 @@
On this car, openpilot defaults to the car's built-in ACC instead of openpilot's longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha.이 차량은 openpilot 가감속 제어 대신 기본적으로 차량의 ACC로 가감속을 제어합니다. openpilot의 가감속 제어로 전환하려면 이 기능을 활성화하세요. openpilot 가감속 제어 알파를 활성화하는 경우 실험 모드 활성화를 권장합니다.
-
- openpilot longitudinal control may come in a future update.
- openpilot 가감속 제어는 향후 업데이트에서 지원될 수 있습니다.
- DevicePanel
diff --git a/selfdrive/ui/translations/main_pt-BR.ts b/selfdrive/ui/translations/main_pt-BR.ts
index e37a16a824..ad787d21d8 100644
--- a/selfdrive/ui/translations/main_pt-BR.ts
+++ b/selfdrive/ui/translations/main_pt-BR.ts
@@ -135,10 +135,6 @@
On this car, openpilot defaults to the car's built-in ACC instead of openpilot's longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha.Neste carro, o openpilot tem como padrão o ACC embutido do carro em vez do controle longitudinal do openpilot. Habilite isso para alternar para o controle longitudinal openpilot. Recomenda-se ativar o modo Experimental ao ativar o embrionário controle longitudinal openpilot.
-
- openpilot longitudinal control may come in a future update.
- O controle longitudinal openpilot poderá vir em uma atualização futura.
- DevicePanel
diff --git a/selfdrive/ui/translations/main_th.ts b/selfdrive/ui/translations/main_th.ts
index 684581ca2f..da281eddc4 100644
--- a/selfdrive/ui/translations/main_th.ts
+++ b/selfdrive/ui/translations/main_th.ts
@@ -135,10 +135,6 @@
On this car, openpilot defaults to the car's built-in ACC instead of openpilot's longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha.โดยปกติสำหรับรถคันนี้ openpilot จะควบคุมการเร่ง/เบรคด้วยระบบ ACC จากโรงงาน แทนการควยคุมโดย openpilot เปิดสวิตซ์นี้เพื่อให้ openpilot ควบคุมการเร่ง/เบรค แนะนำให้เปิดโหมดทดลองเมื่อต้องการให้ openpilot ควบคุมการเร่ง/เบรค ซึ่งอยู่ในสถานะ alpha
-
- openpilot longitudinal control may come in a future update.
- ระบบควบคุมการเร่ง/เบรคโดย openpilot อาจมาในการอัปเดตในอนาคต
- DevicePanel
diff --git a/selfdrive/ui/translations/main_tr.ts b/selfdrive/ui/translations/main_tr.ts
index 5332d3f5f9..06914e982f 100644
--- a/selfdrive/ui/translations/main_tr.ts
+++ b/selfdrive/ui/translations/main_tr.ts
@@ -135,10 +135,6 @@
On this car, openpilot defaults to the car's built-in ACC instead of openpilot's longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha.
-
- openpilot longitudinal control may come in a future update.
-
- DevicePanel
diff --git a/selfdrive/ui/translations/main_zh-CHS.ts b/selfdrive/ui/translations/main_zh-CHS.ts
index 8cd3dd719c..ea9c577984 100644
--- a/selfdrive/ui/translations/main_zh-CHS.ts
+++ b/selfdrive/ui/translations/main_zh-CHS.ts
@@ -135,10 +135,6 @@
On this car, openpilot defaults to the car's built-in ACC instead of openpilot's longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha.在这辆车上,openpilot 默认使用车辆内建的主动巡航控制(ACC),而非 openpilot 的纵向控制。启用此项功能可切换至 openpilot 的纵向控制。当启用 openpilot 纵向控制 Alpha 版本时,建议同时启用实验性模式(Experimental mode)。
-
- openpilot longitudinal control may come in a future update.
- openpilot纵向控制可能会在未来的更新中提供。
- DevicePanel
diff --git a/selfdrive/ui/translations/main_zh-CHT.ts b/selfdrive/ui/translations/main_zh-CHT.ts
index 5c69ac6f6c..0bc7d5b04e 100644
--- a/selfdrive/ui/translations/main_zh-CHT.ts
+++ b/selfdrive/ui/translations/main_zh-CHT.ts
@@ -135,10 +135,6 @@
On this car, openpilot defaults to the car's built-in ACC instead of openpilot's longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha.在這輛車上,openpilot 預設使用車輛內建的主動巡航控制(ACC),而非 openpilot 的縱向控制。啟用此項功能可切換至 openpilot 的縱向控制。當啟用 openpilot 縱向控制 Alpha 版本時,建議同時啟用實驗性模式(Experimental mode)。
-
- openpilot longitudinal control may come in a future update.
- openpilot 縱向控制可能會在未來的更新中提供。
- DevicePanel