pull/33885/head
AlexandreSato 7 months ago
parent 3b74846840
commit c534d771c0
  1. 57
      selfdrive/ui/qt/offroad/developer_panel.cc
  2. 3
      selfdrive/ui/qt/offroad/developer_panel.h
  3. 8
      selfdrive/ui/translations/main_ar.ts
  4. 8
      selfdrive/ui/translations/main_de.ts
  5. 8
      selfdrive/ui/translations/main_es.ts
  6. 8
      selfdrive/ui/translations/main_fr.ts
  7. 8
      selfdrive/ui/translations/main_ja.ts
  8. 8
      selfdrive/ui/translations/main_ko.ts
  9. 8
      selfdrive/ui/translations/main_pt-BR.ts
  10. 8
      selfdrive/ui/translations/main_th.ts
  11. 8
      selfdrive/ui/translations/main_tr.ts
  12. 8
      selfdrive/ui/translations/main_zh-CHS.ts
  13. 8
      selfdrive/ui/translations/main_zh-CHT.ts

@ -23,27 +23,64 @@ DeveloperPanel::DeveloperPanel(SettingsWindow *parent) : ListWidget(parent) {
});
addItem(longManeuverToggle);
alphaLongToggle = new ParamControl("ExperimentalLongitudinalEnabled", 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)."))
.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"
);
alphaLongToggle = new ParamControl("ExperimentalLongitudinalEnabled", tr("openpilot Longitudinal Control (Alpha)"), "", "../assets/offroad/icon_speed_limit.png");
QObject::connect(alphaLongToggle, &ParamControl::toggleFlipped, [=](bool state) {
updateToggles();
});
addItem(alphaLongToggle);
alphaLongToggle->setConfirmation(true, false);
// Joystick and longitudinal maneuvers should be hidden on release branches
// also the toggles should be not available to change in onroad state
// const bool is_release = params.getBool("IsReleaseBranch");
const bool is_release = true;
const bool is_release = params.getBool("IsReleaseBranch");
QObject::connect(uiState(), &UIState::offroadTransition, [=](bool offroad) {
for (auto btn : findChildren<ParamControl *>()) {
if (btn != alphaLongToggle) {
btn->setVisible(!is_release);
btn->setEnabled(offroad);
}
btn->setEnabled(offroad);
}
});
}
void DeveloperPanel::updateToggles() {
const bool is_release = params.getBool("IsReleaseBranch");
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<cereal::CarParams>();
const QString alpha_long_description = 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)."))
.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."));
alphaLongToggle->setDescription("<b>" + alpha_long_description + "</b>");
if (!CP.getExperimentalLongitudinalAvailable() && !CP.getOpenpilotLongitudinalControl()) {
params.remove("ExperimentalLongitudinalEnabled");
alphaLongToggle->setEnabled(false);
alphaLongToggle->setDescription("<b>" + tr("openpilot longitudinal control may come in a future update.") + "</b>");
} else {
if (is_release) {
params.remove("ExperimentalLongitudinalEnabled");
alphaLongToggle->setEnabled(false);
alphaLongToggle->setDescription("<b>" + tr("An alpha version of openpilot longitudinal control can be tested, along with Experimental mode, on non-release branches.") + "</b>");
}
}
// The car already have openpilot longitudinal control and the toggle not is necessary
if (CP.getOpenpilotLongitudinalControl()) {
alphaLongToggle->setVisible(false);
}
alphaLongToggle->refresh();
} else {
alphaLongToggle->setDescription("<b>" + tr("openpilot longitudinal control may come in a future update.") + "</b>");
alphaLongToggle->setEnabled(false);
}
}
void DeveloperPanel::showEvent(QShowEvent *event) {
updateToggles();
}

@ -6,10 +6,13 @@ class DeveloperPanel : public ListWidget {
Q_OBJECT
public:
explicit DeveloperPanel(SettingsWindow *parent);
void showEvent(QShowEvent *event) override;
private:
Params params;
ParamControl* joystickToggle;
ParamControl* longManeuverToggle;
ParamControl* alphaLongToggle;
void updateToggles();
};

@ -135,6 +135,14 @@
<source>On this car, openpilot defaults to the car&apos;s built-in ACC instead of openpilot&apos;s longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha.</source>
<translation type="unfinished">في هذه السيارة يعمل openpilot افتراضياً بالشكل المدمج في التحكم التكيفي في السرعة بدلاً من التحكم الطولي. قم بتمكين هذا الخيار من أجل الانتقال إلى التحكم الطولي. يوصى بتمكين الوضع التجريبي عند استخدام وضع التحكم الطولي ألفا من openpilot.</translation>
</message>
<message>
<source>openpilot longitudinal control may come in a future update.</source>
<translation>قد يتم الحصول على التحكم الطولي في openpilot في عمليات التحديث المستقبلية.</translation>
</message>
<message>
<source>An alpha version of openpilot longitudinal control can be tested, along with Experimental mode, on non-release branches.</source>
<translation>يمكن اختبار نسخة ألفا من التحكم الطولي من openpilot، مع الوضع التجريبي، لكن على الفروع غير المطلقة.</translation>
</message>
</context>
<context>
<name>DevicePanel</name>

@ -135,6 +135,14 @@
<source>On this car, openpilot defaults to the car&apos;s built-in ACC instead of openpilot&apos;s longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>openpilot longitudinal control may come in a future update.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>An alpha version of openpilot longitudinal control can be tested, along with Experimental mode, on non-release branches.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DevicePanel</name>

@ -135,6 +135,14 @@
<source>On this car, openpilot defaults to the car&apos;s built-in ACC instead of openpilot&apos;s longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha.</source>
<translation type="unfinished">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).</translation>
</message>
<message>
<source>openpilot longitudinal control may come in a future update.</source>
<translation>El control longitudinal de openpilot podrá llegar en futuras actualizaciones.</translation>
</message>
<message>
<source>An alpha version of openpilot longitudinal control can be tested, along with Experimental mode, on non-release branches.</source>
<translation>Se puede probar una versión experimental del control longitudinal openpilot, junto con el modo Experimental, en ramas no liberadas.</translation>
</message>
</context>
<context>
<name>DevicePanel</name>

@ -135,6 +135,14 @@
<source>On this car, openpilot defaults to the car&apos;s built-in ACC instead of openpilot&apos;s longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha.</source>
<translation type="unfinished">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&apos;openpilot. Activez ceci pour passer au contrôle longitudinal openpilot. Il est recommandé d&apos;activer le mode expérimental lors de l&apos;activation du contrôle longitudinal openpilot alpha.</translation>
</message>
<message>
<source>openpilot longitudinal control may come in a future update.</source>
<translation>Le contrôle longitudinal openpilot pourrait être disponible dans une future mise à jour.</translation>
</message>
<message>
<source>An alpha version of openpilot longitudinal control can be tested, along with Experimental mode, on non-release branches.</source>
<translation>Une version alpha du contrôle longitudinal openpilot peut être testée, avec le mode expérimental, sur des branches non publiées.</translation>
</message>
</context>
<context>
<name>DevicePanel</name>

@ -135,6 +135,14 @@
<source>On this car, openpilot defaults to the car&apos;s built-in ACC instead of openpilot&apos;s longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>openpilot longitudinal control may come in a future update.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>An alpha version of openpilot longitudinal control can be tested, along with Experimental mode, on non-release branches.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DevicePanel</name>

@ -135,6 +135,14 @@
<source>On this car, openpilot defaults to the car&apos;s built-in ACC instead of openpilot&apos;s longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha.</source>
<translation type="unfinished"> openpilot ACC로 . openpilot의 . openpilot .</translation>
</message>
<message>
<source>openpilot longitudinal control may come in a future update.</source>
<translation>openpilot .</translation>
</message>
<message>
<source>An alpha version of openpilot longitudinal control can be tested, along with Experimental mode, on non-release branches.</source>
<translation>openpilot .</translation>
</message>
</context>
<context>
<name>DevicePanel</name>

@ -135,6 +135,14 @@
<source>On this car, openpilot defaults to the car&apos;s built-in ACC instead of openpilot&apos;s longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha.</source>
<translation type="unfinished">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.</translation>
</message>
<message>
<source>openpilot longitudinal control may come in a future update.</source>
<translation>O controle longitudinal openpilot poderá vir em uma atualização futura.</translation>
</message>
<message>
<source>An alpha version of openpilot longitudinal control can be tested, along with Experimental mode, on non-release branches.</source>
<translation>Uma versão embrionária do controle longitudinal openpilot pode ser testada em conjunto com o modo Experimental, em branches que não sejam de produção.</translation>
</message>
</context>
<context>
<name>DevicePanel</name>

@ -135,6 +135,14 @@
<source>On this car, openpilot defaults to the car&apos;s built-in ACC instead of openpilot&apos;s longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha.</source>
<translation type="unfinished"> openpilot / ACC openpilot openpilot / openpilot / alpha</translation>
</message>
<message>
<source>openpilot longitudinal control may come in a future update.</source>
<translation>/ openpilot </translation>
</message>
<message>
<source>An alpha version of openpilot longitudinal control can be tested, along with Experimental mode, on non-release branches.</source>
<translation>/ openpilot alpha branch </translation>
</message>
</context>
<context>
<name>DevicePanel</name>

@ -135,6 +135,14 @@
<source>On this car, openpilot defaults to the car&apos;s built-in ACC instead of openpilot&apos;s longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>openpilot longitudinal control may come in a future update.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>An alpha version of openpilot longitudinal control can be tested, along with Experimental mode, on non-release branches.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DevicePanel</name>

@ -135,6 +135,14 @@
<source>On this car, openpilot defaults to the car&apos;s built-in ACC instead of openpilot&apos;s longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha.</source>
<translation type="unfinished">openpilot 使ACC openpilot openpilot openpilot Alpha Experimental mode</translation>
</message>
<message>
<source>openpilot longitudinal control may come in a future update.</source>
<translation>openpilot纵向控制可能会在未来的更新中提供</translation>
</message>
<message>
<source>An alpha version of openpilot longitudinal control can be tested, along with Experimental mode, on non-release branches.</source>
<translation>release openpilot Alpha </translation>
</message>
</context>
<context>
<name>DevicePanel</name>

@ -135,6 +135,14 @@
<source>On this car, openpilot defaults to the car&apos;s built-in ACC instead of openpilot&apos;s longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha.</source>
<translation type="unfinished">openpilot 使ACC openpilot openpilot openpilot Alpha Experimental mode</translation>
</message>
<message>
<source>openpilot longitudinal control may come in a future update.</source>
<translation>openpilot </translation>
</message>
<message>
<source>An alpha version of openpilot longitudinal control can be tested, along with Experimental mode, on non-release branches.</source>
<translation> (release) openpilot Alpha </translation>
</message>
</context>
<context>
<name>DevicePanel</name>

Loading…
Cancel
Save