diff --git a/.github/workflows/sunnypilot-master-dev-prep.yaml b/.github/workflows/sunnypilot-master-dev-prep.yaml index 122755f2c4..4aafd4a4a4 100644 --- a/.github/workflows/sunnypilot-master-dev-prep.yaml +++ b/.github/workflows/sunnypilot-master-dev-prep.yaml @@ -118,8 +118,8 @@ jobs: run: | # Use GitHub API to get PRs with specific label, ordered by creation date PR_LIST=$(gh api graphql -f query=' - query($label:String!) { - search(query: $label, type:ISSUE, first:100) { + query($search_query:String!) { + search(query: $search_query, type:ISSUE, first:100) { nodes { ... on PullRequest { number @@ -149,7 +149,7 @@ jobs: } } } - }' -F label="is:pr is:open label:${PR_LABEL} draft:false sort:created-asc") + }' -F search_query="repo:${{ github.repository }} is:pr is:open label:${PR_LABEL},${PR_LABEL}-c3 draft:false sort:created-asc") PR_LIST=${PR_LIST//\'/} echo "PR_LIST=${PR_LIST}" >> $GITHUB_OUTPUT diff --git a/common/params_keys.h b/common/params_keys.h index 11ec8da636..3b5d02a429 100644 --- a/common/params_keys.h +++ b/common/params_keys.h @@ -150,6 +150,7 @@ inline static std::unordered_map keys = { {"EnableGithubRunner", {PERSISTENT | BACKUP, BOOL}}, {"GreenLightAlert", {PERSISTENT | BACKUP, BOOL, "0"}}, {"GithubRunnerSufficientVoltage", {CLEAR_ON_MANAGER_START , BOOL}}, + {"HideVEgoUI", {PERSISTENT | BACKUP, BOOL, "0"}}, {"IntelligentCruiseButtonManagement", {PERSISTENT | BACKUP , BOOL}}, {"InteractivityTimeout", {PERSISTENT | BACKUP, INT, "0"}}, {"IsDevelopmentBranch", {CLEAR_ON_MANAGER_START, BOOL}}, @@ -162,11 +163,14 @@ inline static std::unordered_map keys = { {"OnroadScreenOffBrightness", {PERSISTENT | BACKUP, INT, "100"}}, {"OnroadScreenOffControl", {PERSISTENT | BACKUP, BOOL}}, {"OnroadScreenOffTimer", {PERSISTENT | BACKUP, INT, "0"}}, + {"OnroadUploads", {PERSISTENT | BACKUP, BOOL, "1"}}, {"QuickBootToggle", {PERSISTENT | BACKUP, BOOL, "0"}}, {"QuietMode", {PERSISTENT | BACKUP, BOOL, "0"}}, {"RainbowMode", {PERSISTENT | BACKUP, BOOL, "0"}}, {"ShowAdvancedControls", {PERSISTENT | BACKUP, BOOL, "0"}}, + {"ShowTurnSignals", {PERSISTENT | BACKUP, BOOL, "0"}}, {"StandstillTimer", {PERSISTENT | BACKUP, BOOL, "0"}}, + {"TrueVEgoUI", {PERSISTENT | BACKUP, BOOL, "0"}}, // MADS params {"Mads", {PERSISTENT | BACKUP, BOOL, "1"}}, @@ -193,6 +197,7 @@ inline static std::unordered_map keys = { {"SunnylinkDongleId", {PERSISTENT, STRING}}, {"SunnylinkdPid", {PERSISTENT, INT}}, {"SunnylinkEnabled", {PERSISTENT, BOOL, "1"}}, + {"SunnylinkTempFault", {CLEAR_ON_MANAGER_START | CLEAR_ON_OFFROAD_TRANSITION, BOOL, "0"}}, // Backup Manager params {"BackupManager_CreateBackup", {PERSISTENT, BOOL}}, diff --git a/selfdrive/car/helpers.py b/selfdrive/car/helpers.py index a7abc1976c..384152c71b 100644 --- a/selfdrive/car/helpers.py +++ b/selfdrive/car/helpers.py @@ -57,7 +57,7 @@ def convert_carControlSP(struct: capnp.lib.capnp._DynamicStructReader) -> struct struct_dataclass = structs.CarControlSP(**remove_deprecated({k: v for k, v in struct_dict.items() if not isinstance(k, dict)})) struct_dataclass.mads = structs.ModularAssistiveDrivingSystem(**remove_deprecated(struct_dict.get('mads', {}))) - struct_dataclass.params = [structs.CarControlSP.Param(**remove_deprecated(p)) for p in struct_dict.get('params', [])] + # struct_dataclass.params = [structs.CarControlSP.Param(**remove_deprecated(p)) for p in struct_dict.get('params', [])] struct_dataclass.leadOne = structs.LeadData(**remove_deprecated(struct_dict.get('leadOne', {}))) struct_dataclass.leadTwo = structs.LeadData(**remove_deprecated(struct_dict.get('leadTwo', {}))) struct_dataclass.intelligentCruiseButtonManagement = structs.IntelligentCruiseButtonManagement( diff --git a/selfdrive/ui/qt/onroad/alerts.cc b/selfdrive/ui/qt/onroad/alerts.cc index 2e8f3612eb..d6829c6b08 100644 --- a/selfdrive/ui/qt/onroad/alerts.cc +++ b/selfdrive/ui/qt/onroad/alerts.cc @@ -4,9 +4,6 @@ #include #include "selfdrive/ui/qt/util.h" -#ifdef SUNNYPILOT -#include "selfdrive/ui/sunnypilot/ui.h" -#endif void OnroadAlerts::updateState(const UIState &s) { Alert a = getAlert(*(s.sm), s.scene.started_frame); @@ -76,12 +73,6 @@ void OnroadAlerts::paintEvent(QPaintEvent *event) { } QRect r = QRect(0 + margin, height() - h + margin, width() - margin*2, h - margin*2); -#ifdef SUNNYPILOT - const int dev_ui_info = uiStateSP()->scene.dev_ui_info; - const int adjustment = dev_ui_info > 1 && alert.size != cereal::SelfdriveState::AlertSize::FULL ? 30 : 0; - r = QRect(0 + margin, height() - h + margin - adjustment, width() - margin*2, h - margin*2); -#endif - QPainter p(this); // draw background + gradient diff --git a/selfdrive/ui/qt/onroad/hud.cc b/selfdrive/ui/qt/onroad/hud.cc index d95fe5fd80..540643bed5 100644 --- a/selfdrive/ui/qt/onroad/hud.cc +++ b/selfdrive/ui/qt/onroad/hud.cc @@ -51,8 +51,8 @@ void HudRenderer::draw(QPainter &p, const QRect &surface_rect) { if (is_cruise_available) { drawSetSpeed(p, surface_rect); } -#endif drawCurrentSpeed(p, surface_rect); +#endif p.restore(); } diff --git a/selfdrive/ui/qt/onroad/onroad_home.h b/selfdrive/ui/qt/onroad/onroad_home.h index 9b51bb62e4..ad0603c095 100644 --- a/selfdrive/ui/qt/onroad/onroad_home.h +++ b/selfdrive/ui/qt/onroad/onroad_home.h @@ -4,8 +4,10 @@ #ifdef SUNNYPILOT #include "selfdrive/ui/sunnypilot/qt/onroad/annotated_camera.h" +#include "selfdrive/ui/sunnypilot/qt/onroad/alerts.h" #define UIState UIStateSP #define AnnotatedCameraWidget AnnotatedCameraWidgetSP +#define OnroadAlerts OnroadAlertsSP #else #include "selfdrive/ui/qt/onroad/annotated_camera.h" #endif diff --git a/selfdrive/ui/sunnypilot/SConscript b/selfdrive/ui/sunnypilot/SConscript index 12c09c53f2..be92c14261 100644 --- a/selfdrive/ui/sunnypilot/SConscript +++ b/selfdrive/ui/sunnypilot/SConscript @@ -38,6 +38,7 @@ qt_src = [ "sunnypilot/qt/offroad/settings/trips_panel.cc", "sunnypilot/qt/offroad/settings/vehicle_panel.cc", "sunnypilot/qt/offroad/settings/visuals_panel.cc", + "sunnypilot/qt/onroad/alerts.cc", "sunnypilot/qt/onroad/annotated_camera.cc", "sunnypilot/qt/onroad/buttons.cc", "sunnypilot/qt/onroad/developer_ui/developer_ui.cc", diff --git a/selfdrive/ui/sunnypilot/qt/offroad/settings/brightness.cc b/selfdrive/ui/sunnypilot/qt/offroad/settings/brightness.cc index ffd3ce1d8b..e9bd13485a 100644 --- a/selfdrive/ui/sunnypilot/qt/offroad/settings/brightness.cc +++ b/selfdrive/ui/sunnypilot/qt/offroad/settings/brightness.cc @@ -25,8 +25,8 @@ const QMap Brightness::brightness_options = { Brightness::Brightness() : OptionControlSP( "Brightness", - tr("Brightness"), - tr("Overrides the brightness of the device."), + tr("Global Brightness"), + tr("Overrides the brightness of the device. This applies to both onroad and offroad screens. "), "../assets/offroad/icon_blank.png", {0, 11}, 1, true, &brightness_options) { diff --git a/selfdrive/ui/sunnypilot/qt/offroad/settings/device_panel.cc b/selfdrive/ui/sunnypilot/qt/offroad/settings/device_panel.cc index 7e3d18bd81..43e6067451 100644 --- a/selfdrive/ui/sunnypilot/qt/offroad/settings/device_panel.cc +++ b/selfdrive/ui/sunnypilot/qt/offroad/settings/device_panel.cc @@ -23,6 +23,7 @@ DevicePanelSP::DevicePanelSP(SettingsWindowSP *parent) : DevicePanel(parent) { {"regulatoryBtn", tr("Regulatory"), ""}, {"translateBtn", tr("Language"), ""}, {"resetParams", tr("Reset Settings"), ""}, + {"onroadUploadsBtn", tr("Onroad Uploads"), "OnroadUploads"} }; int row = 0, col = 0; @@ -75,12 +76,14 @@ DevicePanelSP::DevicePanelSP(SettingsWindowSP *parent) : DevicePanel(parent) { connect(buttons["resetParams"], &PushButtonSP::clicked, this, &DevicePanelSP::resetSettings); + connect(buttons["onroadUploadsBtn"], &PushButtonSP::clicked, buttons["onroadUploadsBtn"], &PushButtonSP::updateButton); + // Max Time Offroad maxTimeOffroad = new MaxTimeOffroad(); connect(maxTimeOffroad, &OptionControlSP::updateLabels, maxTimeOffroad, &MaxTimeOffroad::refresh); addItem(maxTimeOffroad); - toggleDeviceBootMode = new ButtonParamControlSP("DeviceBootMode", tr("Wake-Up Behavior"), "", "", {"Default", "Offroad"}, 375, true); + toggleDeviceBootMode = new ButtonParamControlSP("DeviceBootMode", tr("Wake-Up Behavior"), "", "", {"Default", "Offroad"}, 375, true); addItem(toggleDeviceBootMode); connect(toggleDeviceBootMode, &ButtonParamControlSP::buttonClicked, this, [=](int index) { @@ -88,22 +91,6 @@ DevicePanelSP::DevicePanelSP(SettingsWindowSP *parent) : DevicePanel(parent) { updateState(); }); - interactivityTimeout = new OptionControlSP("InteractivityTimeout", tr("Interactivity Timeout"), - tr("Apply a custom timeout for settings UI." - "\nThis is the time after which settings UI closes automatically if user is not interacting with the screen."), - "", {0, 120}, 10, true, nullptr, false); - - connect(interactivityTimeout, &OptionControlSP::updateLabels, [=]() { - updateState(); - }); - - addItem(interactivityTimeout); - - // Brightness - brightness = new Brightness(); - connect(brightness, &OptionControlSP::updateLabels, brightness, &Brightness::refresh); - addItem(brightness); - addItem(device_grid_layout); // offroad mode and power buttons @@ -129,9 +116,8 @@ DevicePanelSP::DevicePanelSP(SettingsWindowSP *parent) : DevicePanel(parent) { offroadBtn->setFixedWidth(power_layout->sizeHint().width()); QObject::connect(offroadBtn, &PushButtonSP::clicked, this, &DevicePanelSP::setOffroadMode); - QVBoxLayout *power_group_layout = new QVBoxLayout(); + power_group_layout = new QVBoxLayout(); power_group_layout->setSpacing(25); - power_group_layout->addWidget(offroadBtn, 0, Qt::AlignHCenter); power_group_layout->addLayout(power_layout); addItem(power_group_layout); @@ -141,9 +127,10 @@ DevicePanelSP::DevicePanelSP(SettingsWindowSP *parent) : DevicePanel(parent) { poweroffBtn, offroadBtn, buttons["quietModeBtn"], + buttons["onroadUploadsBtn"], }; - QObject::connect(uiState(), &UIState::offroadTransition, [=](bool offroad) { + QObject::connect(uiState(), &UIState::offroadTransition, [=](bool _offroad) { for (auto btn : findChildren()) { bool always_enabled = std::find(always_enabled_btns.begin(), always_enabled_btns.end(), btn) != always_enabled_btns.end(); @@ -151,6 +138,8 @@ DevicePanelSP::DevicePanelSP(SettingsWindowSP *parent) : DevicePanel(parent) { btn->setEnabled(offroad); } } + offroad = _offroad; + updateState(); }); } @@ -201,7 +190,7 @@ void DevicePanelSP::updateState() { } bool offroad_mode_param = params.getBool("OffroadMode"); - offroadBtn->setText(offroad_mode_param ? tr("Exit Always Offroad") : tr("Always Offroad")); + offroadBtn->setText(offroad_mode_param ? tr("Exit Always Offroad") : tr("Enable Always Offroad")); offroadBtn->setStyleSheet(offroad_mode_param ? alwaysOffroadStyle : autoOffroadStyle); DeviceSleepModeStatus currStatus = DeviceSleepModeStatus::DEFAULT; @@ -210,10 +199,9 @@ void DevicePanelSP::updateState() { } toggleDeviceBootMode->setDescription(deviceSleepModeDescription(currStatus)); - QString timeoutValue = QString::fromStdString(params.get("InteractivityTimeout")); - if (timeoutValue == "0" || timeoutValue.isEmpty()) { - interactivityTimeout->setLabel("Default"); + if (offroad and not offroad_mode_param) { + power_group_layout->insertWidget(0, offroadBtn, 0, Qt::AlignHCenter); } else { - interactivityTimeout->setLabel(timeoutValue + "s"); + AddWidgetAt(0, offroadBtn); } } diff --git a/selfdrive/ui/sunnypilot/qt/offroad/settings/device_panel.h b/selfdrive/ui/sunnypilot/qt/offroad/settings/device_panel.h index 899a942dae..ce4acfc7cf 100644 --- a/selfdrive/ui/sunnypilot/qt/offroad/settings/device_panel.h +++ b/selfdrive/ui/sunnypilot/qt/offroad/settings/device_panel.h @@ -8,7 +8,6 @@ #pragma once #include "selfdrive/ui/sunnypilot/qt/offroad/settings/max_time_offroad.h" -#include "selfdrive/ui/sunnypilot/qt/offroad/settings/brightness.h" #include "selfdrive/ui/sunnypilot/qt/offroad/settings/settings.h" #include "selfdrive/ui/sunnypilot/qt/widgets/controls.h" @@ -32,8 +31,8 @@ private: PushButtonSP *offroadBtn; MaxTimeOffroad *maxTimeOffroad; ButtonParamControlSP *toggleDeviceBootMode; - Brightness *brightness; - OptionControlSP *interactivityTimeout; + QVBoxLayout *power_group_layout; + bool offroad; const QString alwaysOffroadStyle = R"( PushButtonSP { diff --git a/selfdrive/ui/sunnypilot/qt/offroad/settings/display/onroad_screen_brightness.cc b/selfdrive/ui/sunnypilot/qt/offroad/settings/display/onroad_screen_brightness.cc index 3e9dc427bf..f28d9e45e8 100644 --- a/selfdrive/ui/sunnypilot/qt/offroad/settings/display/onroad_screen_brightness.cc +++ b/selfdrive/ui/sunnypilot/qt/offroad/settings/display/onroad_screen_brightness.cc @@ -12,30 +12,29 @@ OnroadScreenBrightnessControl::OnroadScreenBrightnessControl(const QString ¶ QWidget *parent) : ExpandableToggleRow(param, title, description, icon, parent) { auto *mainFrame = new QFrame(this); - auto *mainFrameLayout = new QGridLayout(); + auto *mainFrameLayout = new QVBoxLayout(); mainFrame->setLayout(mainFrameLayout); - mainFrameLayout->setSpacing(0); + mainFrameLayout->setSpacing(30); + mainFrameLayout->setContentsMargins(0, 0, 0, 0); onroadScreenOffTimer = new OptionControlSP( "OnroadScreenOffTimer", - "", + "Onroad Brightness Delay", "", "", {0, 11}, 1, true, &onroadScreenOffTimerOptions); onroadScreenBrightness = new OptionControlSP( "OnroadScreenOffBrightness", + "Onroad Brightness", "", "", - "", - {0, 100}, 10, true, nullptr, false); + {0, 100}, 10, true); connect(onroadScreenOffTimer, &OptionControlSP::updateLabels, this, &OnroadScreenBrightnessControl::refresh); connect(onroadScreenBrightness, &OptionControlSP::updateLabels, this, &OnroadScreenBrightnessControl::refresh); - onroadScreenOffTimer->setFixedWidth(280); - onroadScreenBrightness->setFixedWidth(280); - mainFrameLayout->addWidget(onroadScreenOffTimer, 0, 0, Qt::AlignLeft); - mainFrameLayout->addWidget(onroadScreenBrightness, 0, 1, Qt::AlignRight); + mainFrameLayout->addWidget(onroadScreenBrightness); + mainFrameLayout->addWidget(onroadScreenOffTimer); addItem(mainFrame); @@ -45,19 +44,11 @@ OnroadScreenBrightnessControl::OnroadScreenBrightnessControl(const QString ¶ void OnroadScreenBrightnessControl::refresh() { // Driving Screen Off Timer int valTimer = std::atoi(params.get("OnroadScreenOffTimer").c_str()); - std::string labelTimer = ""; - labelTimer += "Delay"; - labelTimer += "
"; - labelTimer += (valTimer < 60 ? std::to_string(valTimer) + "s" : std::to_string(valTimer / 60) + "m"); - labelTimer += "
"; + std::string labelTimer = (valTimer < 60 ? std::to_string(valTimer) + "s" : std::to_string(valTimer / 60) + "m"); onroadScreenOffTimer->setLabel(QString::fromStdString(labelTimer)); // Driving Screen Off Brightness std::string valBrightness = params.get("OnroadScreenOffBrightness"); - std::string labelBrightness = ""; - labelBrightness += "Brightness"; - labelBrightness += "
"; - labelBrightness += (valBrightness == "0" ? " Screen Off" : valBrightness + "%"); - labelBrightness += "
"; + std::string labelBrightness = (valBrightness == "0" ? " Screen Off" : valBrightness + "%"); onroadScreenBrightness->setLabel(QString::fromStdString(labelBrightness)); } diff --git a/selfdrive/ui/sunnypilot/qt/offroad/settings/display_panel.cc b/selfdrive/ui/sunnypilot/qt/offroad/settings/display_panel.cc index b441021ff3..465047f178 100644 --- a/selfdrive/ui/sunnypilot/qt/offroad/settings/display_panel.cc +++ b/selfdrive/ui/sunnypilot/qt/offroad/settings/display_panel.cc @@ -18,12 +18,30 @@ DisplayPanel::DisplayPanel(QWidget *parent) : QWidget(parent) { // Onroad Screen Off/Brightness onroadScreenBrightnessControl = new OnroadScreenBrightnessControl( "OnroadScreenOffControl", - tr("Driving Screen Off: Non-Critical Events"), + tr("Onroad Screen: Reduced Brightness"), tr("Turn off device screen or reduce brightness after driving starts. " - "It automatically brightens again when screen is touched or a critical event occurs."), + "It automatically brightens again when screen is touched or a visible alert is displayed."), "", this); list->addItem(onroadScreenBrightnessControl); + list->addItem(horizontal_line()); + + // Global Brightness + brightness = new Brightness(); + connect(brightness, &OptionControlSP::updateLabels, brightness, &Brightness::refresh); + list->addItem(brightness); + list->addItem(horizontal_line()); + + // Interactivity Timeout + interactivityTimeout = new OptionControlSP("InteractivityTimeout", tr("Interactivity Timeout"), + tr("Apply a custom timeout for settings UI." + "\nThis is the time after which settings UI closes automatically if user is not interacting with the screen."), + "", {0, 120}, 10, true, nullptr, false); + + connect(interactivityTimeout, &OptionControlSP::updateLabels, [=]() { + refresh(); + }); + list->addItem(interactivityTimeout); sunnypilotScroller = new ScrollViewSP(list, this); vlayout->addWidget(sunnypilotScroller); @@ -37,4 +55,11 @@ void DisplayPanel::showEvent(QShowEvent *event) { void DisplayPanel::refresh() { onroadScreenBrightnessControl->refresh(); + + QString timeoutValue = QString::fromStdString(params.get("InteractivityTimeout")); + if (timeoutValue == "0" || timeoutValue.isEmpty()) { + interactivityTimeout->setLabel("Default"); + } else { + interactivityTimeout->setLabel(timeoutValue + "s"); + } } diff --git a/selfdrive/ui/sunnypilot/qt/offroad/settings/display_panel.h b/selfdrive/ui/sunnypilot/qt/offroad/settings/display_panel.h index 1714c8a436..69b440c9d3 100644 --- a/selfdrive/ui/sunnypilot/qt/offroad/settings/display_panel.h +++ b/selfdrive/ui/sunnypilot/qt/offroad/settings/display_panel.h @@ -7,6 +7,7 @@ #pragma once +#include "selfdrive/ui/sunnypilot/qt/offroad/settings/brightness.h" #include "selfdrive/ui/sunnypilot/qt/offroad/settings/display/onroad_screen_brightness.h" #include "selfdrive/ui/sunnypilot/qt/offroad/settings/settings.h" #include "selfdrive/ui/sunnypilot/qt/widgets/scrollview.h" @@ -25,4 +26,6 @@ private: ScrollViewSP *sunnypilotScroller = nullptr; Params params; OnroadScreenBrightnessControl *onroadScreenBrightnessControl = nullptr; + Brightness *brightness; + OptionControlSP *interactivityTimeout; }; diff --git a/selfdrive/ui/sunnypilot/qt/offroad/settings/osm_panel.cc b/selfdrive/ui/sunnypilot/qt/offroad/settings/osm_panel.cc index 332fd71a18..e946d7870f 100644 --- a/selfdrive/ui/sunnypilot/qt/offroad/settings/osm_panel.cc +++ b/selfdrive/ui/sunnypilot/qt/offroad/settings/osm_panel.cc @@ -12,6 +12,7 @@ #include #include "common/swaglog.h" +#include "selfdrive/ui/sunnypilot/qt/util.h" #include "selfdrive/ui/sunnypilot/qt/widgets/scrollview.h" OsmPanel::OsmPanel(QWidget *parent) : QFrame(parent) { @@ -91,24 +92,30 @@ ButtonControlSP *OsmPanel::setupOsmDownloadButton(QWidget *parent) { locationTitles.push_back(std::get<0>(loc)); } - const QString selection = MultiOptionDialog::getSelection(tr("Country"), locationTitles, currentTitle, this); - if (!selection.isEmpty()) { - params.put("OsmLocal", "1"); - params.put("OsmLocationTitle", selection.toStdString()); - for (auto &loc: locations) { - if (std::get<0>(loc) == selection) { - params.put("OsmLocationName", std::get<1>(loc).toStdString()); - break; + InputDialog d(tr("Search Country"), this, tr("Enter search keywords, or leave blank to list all countries."), false); + d.setMinLength(0); + const int ret = d.exec(); + if (ret) { + const QString selection = search(d.text(), locationTitles, tr("Select Country")); + if (!selection.isEmpty()) { + params.put("OsmLocal", "1"); + params.put("OsmLocationTitle", selection.toStdString()); + for (auto &loc: locations) { + if (std::get<0>(loc) == selection) { + params.put("OsmLocationName", std::get<1>(loc).toStdString()); + break; + } } - } - if (params.get("OsmLocationName") == "US") { - usStatesBtn->click(); - return; - } else if (selection != "== None ==") { - if (showConfirmationDialog(parent)) { - osm_download_in_progress = true; - params.putBool("OsmDbUpdatesCheck", true); - updateLabels(); + if (params.get("OsmLocationName") == "US") { + usStatesBtn->click(); + return; + } + if (selection != "== None ==") { + if (showConfirmationDialog(parent)) { + osm_download_in_progress = true; + params.putBool("OsmDbUpdatesCheck", true); + updateLabels(); + } } } } @@ -135,20 +142,25 @@ ButtonControlSP *OsmPanel::setupUsStatesButton(QWidget *parent) { locationTitles.push_back(std::get<0>(loc)); } - const QString selection = MultiOptionDialog::getSelection(tr("State"), locationTitles, currentTitle, this); - if (!selection.isEmpty()) { - params.put("OsmStateTitle", selection.toStdString()); - for (auto &loc: locations) { - if (std::get<0>(loc) == selection) { - params.put("OsmStateName", std::get<1>(loc).toStdString()); - break; + InputDialog d(tr("Search State"), this, tr("Enter search keywords, or leave blank to list all states."), false); + d.setMinLength(0); + const int ret = d.exec(); + if (ret) { + const QString selection = search(d.text(), locationTitles, tr("Select State")); + if (!selection.isEmpty()) { + params.put("OsmStateTitle", selection.toStdString()); + for (auto &loc: locations) { + if (std::get<0>(loc) == selection) { + params.put("OsmStateName", std::get<1>(loc).toStdString()); + break; + } + } + usStatesBtn->setValue(selection); + if (showConfirmationDialog(parent)) { + osm_download_in_progress = true; + params.putBool("OsmDbUpdatesCheck", true); + updateLabels(); } - } - usStatesBtn->setValue(selection); - if (showConfirmationDialog(parent)) { - osm_download_in_progress = true; - params.putBool("OsmDbUpdatesCheck", true); - updateLabels(); } } updateLabels(); @@ -281,3 +293,15 @@ void OsmPanel::updateMapSize() { mapSizeFuture = QtConcurrent::run(getDirSize, MAP_PATH); } } + +QString OsmPanel::search(const QString &query, const QStringList &list, const QString &prompt_text) { + QStringList lst_results = searchFromList(query, list); + QString selection; + + if (lst_results.isEmpty()) { + ConfirmationDialog::alert(tr("No results found for keywords: %1").arg(query), this); + return selection; + } + selection = MultiOptionDialog::getSelection(prompt_text, lst_results, "", this); + return selection; +} diff --git a/selfdrive/ui/sunnypilot/qt/offroad/settings/osm_panel.h b/selfdrive/ui/sunnypilot/qt/offroad/settings/osm_panel.h index 171129a11c..e4067d415f 100644 --- a/selfdrive/ui/sunnypilot/qt/offroad/settings/osm_panel.h +++ b/selfdrive/ui/sunnypilot/qt/offroad/settings/osm_panel.h @@ -76,6 +76,7 @@ private: void updateDownloadProgress(); static int extractIntFromJson(const QJsonObject &json, const QString &key); QString processUpdateStatus(bool pending_update_check, int total_files, int downloaded_files, const QJsonObject &json, bool failed_state); + QString search(const QString &query, const QStringList &list, const QString &prompt_text); ConfirmationDialog *confirmationDialog; LabelControlSP *mapdVersion; diff --git a/selfdrive/ui/sunnypilot/qt/offroad/settings/visuals_panel.cc b/selfdrive/ui/sunnypilot/qt/offroad/settings/visuals_panel.cc index 7c1107d653..0324cd70f0 100644 --- a/selfdrive/ui/sunnypilot/qt/offroad/settings/visuals_panel.cc +++ b/selfdrive/ui/sunnypilot/qt/offroad/settings/visuals_panel.cc @@ -69,6 +69,27 @@ VisualsPanel::VisualsPanel(QWidget *parent) : QWidget(parent) { "", false, }, + { + "TrueVEgoUI", + tr("Speedometer: Always Display True Speed"), + tr("Always display the true vehicle current speed from wheel speed sensors."), + "", + false, + }, + { + "HideVEgoUI", + tr("Speedometer: Hide from Onroad Screen"), + tr("When enabled, the speedometer on the onroad screen is not displayed."), + "", + false, + }, + { + "ShowTurnSignals", + tr("Display Turn Signals"), + tr("When enabled, visual turn indicators are drawn on the HUD."), + "", + false, + }, }; // Add regular toggles first diff --git a/selfdrive/ui/sunnypilot/qt/onroad/alerts.cc b/selfdrive/ui/sunnypilot/qt/onroad/alerts.cc new file mode 100644 index 0000000000..695f6d2ce8 --- /dev/null +++ b/selfdrive/ui/sunnypilot/qt/onroad/alerts.cc @@ -0,0 +1,102 @@ +/** + * Copyright (c) 2021-, Haibin Wen, sunnypilot, and a number of other contributors. + * + * This file is part of sunnypilot and is licensed under the MIT License. + * See the LICENSE.md file in the root directory for more details. + */ + +#include "selfdrive/ui/sunnypilot/qt/onroad/alerts.h" + +#include +#include +#include +#include + +OnroadAlerts::Alert OnroadAlertsSP::getAlert(const SubMaster &sm, uint64_t started_frame) { + OnroadAlerts::Alert alert = OnroadAlerts::getAlert(sm, started_frame); + alert.text1.replace("openpilot", "sunnypilot"); + alert.text2.replace("openpilot", "sunnypilot"); + return alert; +} + +void OnroadAlertsSP::paintEvent(QPaintEvent *event) { + if (alert.size == cereal::SelfdriveState::AlertSize::NONE) { + return; + } else if (alert.size == cereal::SelfdriveState::AlertSize::FULL) { + OnroadAlerts::paintEvent(event); + return; + } + static std::map alert_heights = { + {cereal::SelfdriveState::AlertSize::SMALL, 271}, + {cereal::SelfdriveState::AlertSize::MID, 420} + }; + int h = alert_heights[alert.size]; + + QPainter p(this); + QFont topFont; + QFont bottomFont; + QRect topTextBoundingRect; + QRect bottomTextBoundingRect; + QRect rect; + + int margin = 40; + int radius = 30; + + const int dev_ui_info = uiStateSP()->scene.dev_ui_info; + const int v_adjustment = dev_ui_info > 1 && alert.size != cereal::SelfdriveState::AlertSize::FULL ? 40 : 0; + const int h_adjustment = dev_ui_info > 0 && alert.size != cereal::SelfdriveState::AlertSize::FULL ? 230 : 0; + + if (alert.size == cereal::SelfdriveState::AlertSize::SMALL) { + topFont = InterFont(74, QFont::DemiBold); + QFontMetrics fmTop(topFont); + topTextBoundingRect = fmTop.boundingRect( + QRect(0 + margin, height() - h + margin - v_adjustment, width() - margin * 2 - h_adjustment, 0), Qt::TextWordWrap, + alert.text1); + h = topTextBoundingRect.height(); + rect = QRect(0 + margin, height() - h - margin * 2 - v_adjustment, width() - margin * 2 - h_adjustment, h + margin); + } else if (alert.size == cereal::SelfdriveState::AlertSize::MID) { + topFont = InterFont(88, QFont::Bold); + bottomFont = InterFont(66); + QFontMetrics fmTop(topFont); + QFontMetrics fmBotton(bottomFont); + topTextBoundingRect = fmTop.boundingRect( + QRect(0 + margin, height() - h + margin - v_adjustment, width() - margin * 2 - h_adjustment, 0), Qt::TextWordWrap, + alert.text1); + bottomTextBoundingRect = fmBotton.boundingRect( + QRect(0 + margin, height() - h + margin - v_adjustment + topTextBoundingRect.height(), + width() - margin * 2 - h_adjustment, 0), Qt::TextWordWrap, alert.text2); + h = topTextBoundingRect.height() + bottomTextBoundingRect.height() + margin * 2; + rect = QRect(0 + margin, height() - h - margin * 2 - v_adjustment, width() - margin * 2 - h_adjustment, h + margin); + } + + + // draw background + gradient + // draw background + gradient + p.setPen(Qt::NoPen); + p.setCompositionMode(QPainter::CompositionMode_SourceOver); + p.setBrush(QBrush(alert_colors[alert.status])); + p.drawRoundedRect(rect, radius, radius); + + QLinearGradient g(0, rect.y(), 0, rect.bottom()); + g.setColorAt(0, QColor::fromRgbF(0, 0, 0, 0.05)); + g.setColorAt(1, QColor::fromRgbF(0, 0, 0, 0.35)); + + p.setCompositionMode(QPainter::CompositionMode_DestinationOver); + p.setBrush(QBrush(g)); + p.drawRoundedRect(rect, radius, radius); + p.setCompositionMode(QPainter::CompositionMode_SourceOver); + + // text + p.setPen(QColor(0xff, 0xff, 0xff)); + p.setRenderHint(QPainter::TextAntialiasing); + p.setFont(topFont); + if (alert.size == cereal::SelfdriveState::AlertSize::SMALL) { + p.drawText(rect, Qt::AlignCenter | Qt::TextWordWrap, alert.text1); + } else if (alert.size == cereal::SelfdriveState::AlertSize::MID) { + QRect topText = QRect(rect.x(), rect.top() + margin, rect.width(), topTextBoundingRect.height()); + p.drawText(topText, Qt::AlignHCenter | Qt::AlignTop | Qt::TextWordWrap | Qt::AlignCenter, alert.text1); + p.setFont(bottomFont); + p.drawText(QRect(rect.x(), topText.bottom() + margin, rect.width(), bottomTextBoundingRect.height()), + Qt::AlignHCenter | Qt::TextWordWrap | Qt::AlignCenter, alert.text2); + } +} diff --git a/selfdrive/ui/sunnypilot/qt/onroad/alerts.h b/selfdrive/ui/sunnypilot/qt/onroad/alerts.h new file mode 100644 index 0000000000..8b65309f46 --- /dev/null +++ b/selfdrive/ui/sunnypilot/qt/onroad/alerts.h @@ -0,0 +1,22 @@ +/** + * Copyright (c) 2021-, Haibin Wen, sunnypilot, and a number of other contributors. + * + * This file is part of sunnypilot and is licensed under the MIT License. + * See the LICENSE.md file in the root directory for more details. + */ + +#pragma once + +#include "selfdrive/ui/qt/onroad/alerts.h" +#include "selfdrive/ui/sunnypilot/ui.h" + +class OnroadAlertsSP : public OnroadAlerts { + Q_OBJECT + +public: + OnroadAlertsSP(QWidget *parent = 0) : OnroadAlerts(parent) {} + +protected: + void paintEvent(QPaintEvent *) override; + Alert getAlert(const SubMaster &sm, uint64_t started_frame); +}; diff --git a/selfdrive/ui/sunnypilot/qt/onroad/hud.cc b/selfdrive/ui/sunnypilot/qt/onroad/hud.cc index 21d66ffa99..251140ad17 100644 --- a/selfdrive/ui/sunnypilot/qt/onroad/hud.cc +++ b/selfdrive/ui/sunnypilot/qt/onroad/hud.cc @@ -107,6 +107,7 @@ void HudRendererSP::updateState(const UIState &s) { standstillTimer = s.scene.standstill_timer; isStandstill = car_state.getStandstill(); + if (not s.scene.started) standstillElapsedTime = 0.0; longOverride = car_control.getCruiseControl().getOverride(); smartCruiseControlVisionEnabled = lp_sp.getSmartCruiseControl().getVision().getEnabled(); smartCruiseControlVisionActive = lp_sp.getSmartCruiseControl().getVision().getActive(); @@ -115,6 +116,17 @@ void HudRendererSP::updateState(const UIState &s) { greenLightAlert = lp_sp.getE2eAlerts().getGreenLightAlert(); leadDepartAlert = lp_sp.getE2eAlerts().getLeadDepartAlert(); + + // override stock current speed values + float v_ego = (v_ego_cluster_seen && !s.scene.trueVEgoUI) ? car_state.getVEgoCluster() : car_state.getVEgo(); + speed = std::max(0.0f, v_ego * (is_metric ? MS_TO_KPH : MS_TO_MPH)); + hideVEgoUI = s.scene.hideVEgoUI; + + leftBlinkerOn = car_state.getLeftBlinker(); + rightBlinkerOn = car_state.getRightBlinker(); + leftBlindspot = car_state.getLeftBlindspot(); + rightBlindspot = car_state.getRightBlindspot(); + showTurnSignals = s.scene.turn_signals; } void HudRendererSP::draw(QPainter &p, const QRect &surface_rect) { @@ -128,6 +140,10 @@ void HudRendererSP::draw(QPainter &p, const QRect &surface_rect) { drawSetSpeedSP(p, surface_rect); } + if (!hideVEgoUI) { + drawCurrentSpeedSP(p, surface_rect); + } + if (!reversing) { // Smart Cruise Control int x_offset = -260; @@ -170,11 +186,6 @@ void HudRendererSP::draw(QPainter &p, const QRect &surface_rect) { drawRightDevUI(p, surface_rect.right() - 184 - UI_BORDER_SIZE * 2, UI_BORDER_SIZE * 2 + rect_right.height()); } - // Standstill Timer - if (standstillTimer) { - drawStandstillTimer(p, surface_rect.right() / 12 * 10, surface_rect.bottom() / 12 * 1.53); - } - // Speed Limit bool showSpeedLimit; bool speed_limit_assist_pre_active_pulse = pulseElement(speedLimitAssistFrame); @@ -225,8 +236,27 @@ void HudRendererSP::draw(QPainter &p, const QRect &surface_rect) { alert_img = devUiInfo > 0 ? lead_depart_alert_small_img : lead_depart_alert_large_img; } drawE2eAlert(p, surface_rect); - } else { + } + // Standstill Timer + else if (standstillTimer && isStandstill) { + alert_img = QPixmap(); + + standstillElapsedTime += 1.0 / UI_FREQ; + int minute = static_cast(standstillElapsedTime / 60); + int second = static_cast(standstillElapsedTime - (minute * 60)); + alert_text = QString("%1:%2").arg(minute, 1, 10, QChar('0')).arg(second, 2, 10, QChar('0')); + drawE2eAlert(p, surface_rect, tr("STOPPED")); + e2eAlertFrame++; + } + // No Alerts displayed + else { e2eAlertFrame = 0; + if (not isStandstill) standstillElapsedTime = 0.0; + } + + // Blinker + if (showTurnSignals) { + drawBlinker(p, surface_rect); } } @@ -385,40 +415,6 @@ void HudRendererSP::drawBottomDevUI(QPainter &p, int x, int y) { rw += drawBottomDevUIElement(p, rw, y, altitudeElement.value, altitudeElement.label, altitudeElement.units, altitudeElement.color); } -void HudRendererSP::drawStandstillTimer(QPainter &p, int x, int y) { - if (isStandstill) { - standstillElapsedTime += 1.0 / UI_FREQ; - - int minute = static_cast(standstillElapsedTime / 60); - int second = static_cast(standstillElapsedTime - (minute * 60)); - - // stop sign for standstill timer - const int size = 190; // size - const float angle = M_PI / 8.0; - - QPolygon octagon; - for (int i = 0; i < 8; i++) { - float curr_angle = angle + i * M_PI / 4.0; - int point_x = x + size / 2 * cos(curr_angle); - int point_y = y + size / 2 * sin(curr_angle); - octagon << QPoint(point_x, point_y); - } - - p.setPen(QPen(Qt::white, 6)); - p.setBrush(QColor(255, 90, 81, 200)); // red pastel - p.drawPolygon(octagon); - - QString time_str = QString("%1:%2").arg(minute, 1, 10, QChar('0')).arg(second, 2, 10, QChar('0')); - p.setFont(InterFont(55, QFont::Bold)); - p.setPen(Qt::white); - QRect timerTextRect = p.fontMetrics().boundingRect(QString(time_str)); - timerTextRect.moveCenter({x, y}); - p.drawText(timerTextRect, Qt::AlignCenter, QString(time_str)); - } else { - standstillElapsedTime = 0.0; - } -} - void HudRendererSP::drawSpeedLimitSigns(QPainter &p, QRect &sign_rect) { bool speedLimitWarningEnabled = speedLimitMode >= SpeedLimitMode::WARNING; // TODO-SP: update to include SpeedLimitMode::ASSIST bool hasSpeedLimit = speedLimitValid || speedLimitLastValid; @@ -701,7 +697,7 @@ void HudRendererSP::drawSetSpeedSP(QPainter &p, const QRect &surface_rect) { p.drawText(set_speed_rect.adjusted(0, 77, 0, 0), Qt::AlignTop | Qt::AlignHCenter, setSpeedStr); } -void HudRendererSP::drawE2eAlert(QPainter &p, const QRect &surface_rect) { +void HudRendererSP::drawE2eAlert(QPainter &p, const QRect &surface_rect, const QString &alert_alt_text) { int size = devUiInfo > 0 ? e2e_alert_small : e2e_alert_large; int x = surface_rect.center().x() + surface_rect.width() / 4; int y = surface_rect.center().y() + 40; @@ -711,23 +707,127 @@ void HudRendererSP::drawE2eAlert(QPainter &p, const QRect &surface_rect) { // Alert Circle QPoint center = alertRect.center(); - QColor frameColor = pulseElement(e2eAlertFrame) ? QColor(255, 255, 255, 75) : QColor(0, 255, 0, 75); + QColor frameColor; + if (not alert_alt_text.isEmpty()) frameColor = QColor(255, 255, 255, 75); + else frameColor = pulseElement(e2eAlertFrame) ? QColor(255, 255, 255, 75) : QColor(0, 255, 0, 75); p.setPen(QPen(frameColor, 15)); p.setBrush(QColor(0, 0, 0, 190)); p.drawEllipse(center, size, size); // Alert Text - QColor txtColor = pulseElement(e2eAlertFrame) ? QColor(255, 255, 255, 255) : QColor(0, 255, 0, 255); - p.setFont(InterFont(48, QFont::Bold)); + QColor txtColor; + QFont font; + int alert_bottom_adjustment; + if (not alert_alt_text.isEmpty()) { + font = InterFont(100, QFont::Bold); + alert_bottom_adjustment = 5; + txtColor = QColor(255, 255, 255, 255); + } else { + font = InterFont(48, QFont::Bold); + alert_bottom_adjustment = 7; + txtColor = pulseElement(e2eAlertFrame) ? QColor(255, 255, 255, 255) : QColor(0, 255, 0, 190); + } p.setPen(txtColor); + p.setFont(font); QFontMetrics fm(p.font()); QRect textRect = fm.boundingRect(alertRect, Qt::TextWordWrap, alert_text); textRect.moveCenter({alertRect.center().x(), alertRect.center().y()}); - textRect.moveBottom(alertRect.bottom() - alertRect.height() / 7); + textRect.moveBottom(alertRect.bottom() - alertRect.height() / alert_bottom_adjustment); p.drawText(textRect, Qt::AlignCenter, alert_text); - // Alert Image - QPointF pixmapCenterOffset = QPointF(alert_img.width() / 2.0, alert_img.height() / 2.0); - QPointF drawPoint = center - pixmapCenterOffset; - p.drawPixmap(drawPoint, alert_img); + if (not alert_alt_text.isEmpty()) { + // Alert Alternate Text + p.setFont(InterFont(80, QFont::Bold)); + p.setPen(QColor(255, 175, 3, 240)); + QFontMetrics fmt(p.font()); + QRect topTextRect = fmt.boundingRect(alertRect, Qt::TextWordWrap, alert_alt_text); + topTextRect.moveCenter({alertRect.center().x(), alertRect.center().y()}); + topTextRect.moveTop(alertRect.top() + alertRect.height() / 3.5); + p.drawText(topTextRect, Qt::AlignCenter, alert_alt_text); + } else { + // Alert Image instead of Top Text + QPointF pixmapCenterOffset = QPointF(alert_img.width() / 2.0, alert_img.height() / 2.0); + QPointF drawPoint = center - pixmapCenterOffset; + p.drawPixmap(drawPoint, alert_img); + } +} + +void HudRendererSP::drawCurrentSpeedSP(QPainter &p, const QRect &surface_rect) { + QString speedStr = QString::number(std::nearbyint(speed)); + + p.setFont(InterFont(176, QFont::Bold)); + HudRenderer::drawText(p, surface_rect.center().x(), 210, speedStr); + + p.setFont(InterFont(66)); + HudRenderer::drawText(p, surface_rect.center().x(), 290, is_metric ? tr("km/h") : tr("mph"), 200); +} + +void HudRendererSP::drawBlinker(QPainter &p, const QRect &surface_rect) { + if (!leftBlinkerOn && !rightBlinkerOn) { + blinkerFrameCounter = 0; + return; + } + ++blinkerFrameCounter; + + const int circleRadius = 44; + const int arrowLength = 44; + const int x_gap = 180; + const int y_offset = 272; + + const int centerX = surface_rect.center().x(); + const bool hazard = leftBlinkerOn && rightBlinkerOn; + + const QPen bgBorder(Qt::white, 5); + const QPen arrowPen(Qt::NoPen); + + p.save(); + + auto drawArrow = [&](int cx, int cy, int dir, const QBrush &arrowBrush) { + const int bodyLength = arrowLength / 2; + const int bodyWidth = arrowLength / 2; + const int headLength = arrowLength / 2; + const int headWidth = arrowLength; + + QPolygon arrow; + arrow.reserve(7); + arrow << QPoint(cx - dir * bodyLength, cy - bodyWidth / 2) + << QPoint(cx, cy - bodyWidth / 2) + << QPoint(cx, cy - headWidth / 2) + << QPoint(cx + dir * headLength, cy) + << QPoint(cx, cy + headWidth / 2) + << QPoint(cx, cy + bodyWidth / 2) + << QPoint(cx - dir * bodyLength, cy + bodyWidth / 2); + + p.setPen(arrowPen); + p.setBrush(arrowBrush); + p.drawPolygon(arrow); + }; + + auto drawCircle = [&](int cx, int cy, const QBrush &bgBrush) { + p.setPen(bgBorder); + p.setBrush(bgBrush); + p.drawEllipse(QPoint(cx, cy), circleRadius, circleRadius); + }; + + struct BlinkerSide { bool on; int dir; bool blocked; int cx; }; + const std::array sides = {{ + {leftBlinkerOn, -1, hazard ? true : (leftBlinkerOn && leftBlindspot), centerX - x_gap}, + {rightBlinkerOn, 1, hazard ? true : (rightBlinkerOn && rightBlindspot), centerX + x_gap}, + }}; + + for (const auto &s: sides) { + if (!s.on) continue; + + QColor bgColor = s.blocked ? QColor(135, 23, 23) : QColor(23, 134, 68); + QColor arrowColor = s.blocked ? QColor(66, 12, 12) : QColor(12, 67, 34); + if (pulseElement(blinkerFrameCounter)) arrowColor = Qt::white; + + const QBrush bgBrush(bgColor); + const QBrush arrowBrush(arrowColor); + + drawCircle(s.cx, y_offset, bgBrush); + drawArrow(s.cx, y_offset, s.dir, arrowBrush); + } + + p.restore(); } diff --git a/selfdrive/ui/sunnypilot/qt/onroad/hud.h b/selfdrive/ui/sunnypilot/qt/onroad/hud.h index cf840ee3d0..c50e2d641d 100644 --- a/selfdrive/ui/sunnypilot/qt/onroad/hud.h +++ b/selfdrive/ui/sunnypilot/qt/onroad/hud.h @@ -36,7 +36,9 @@ private: void drawRoadName(QPainter &p, const QRect &surface_rect); void drawSpeedLimitPreActiveArrow(QPainter &p, QRect &sign_rect); void drawSetSpeedSP(QPainter &p, const QRect &surface_rect); - void drawE2eAlert(QPainter &p, const QRect &surface_rect); + void drawE2eAlert(QPainter &p, const QRect &surface_rect, const QString &alert_alt_text = ""); + void drawCurrentSpeedSP(QPainter &p, const QRect &surface_rect); + void drawBlinker(QPainter &p, const QRect &surface_rect); bool lead_status; float lead_d_rel; @@ -106,4 +108,11 @@ private: QPixmap lead_depart_alert_large_img; QString alert_text; QPixmap alert_img; + bool hideVEgoUI; + bool leftBlinkerOn; + bool rightBlinkerOn; + bool leftBlindspot; + bool rightBlindspot; + int blinkerFrameCounter; + bool showTurnSignals; }; diff --git a/selfdrive/ui/sunnypilot/qt/util.cc b/selfdrive/ui/sunnypilot/qt/util.cc index 2e066e88b5..be39b297d7 100644 --- a/selfdrive/ui/sunnypilot/qt/util.cc +++ b/selfdrive/ui/sunnypilot/qt/util.cc @@ -95,13 +95,12 @@ QStringList searchFromList(const QString &query, const QStringList &list) { return list; } - QStringList search_terms = query.simplified().toLower().split(" ", QString::SkipEmptyParts); + QStringList search_terms = query.simplified().toLower().replace(QRegularExpression("[^a-zA-Z0-9\\s]"), " ").split(" ", QString::SkipEmptyParts); QStringList search_results; for (const QString &element : list) { if (std::all_of(search_terms.begin(), search_terms.end(), [&](const QString &term) { QString normalized_term = term.normalized(QString::NormalizationForm_KD).toLower(); - normalized_term.remove(QRegularExpression("[^a-zA-Z0-9\\s]")); QString normalized_element = element.normalized(QString::NormalizationForm_KD).toLower(); return normalized_element.contains(normalized_term, Qt::CaseInsensitive); })) { diff --git a/selfdrive/ui/sunnypilot/qt/widgets/controls.h b/selfdrive/ui/sunnypilot/qt/widgets/controls.h index e9e1e4bb85..e111ce2fb5 100644 --- a/selfdrive/ui/sunnypilot/qt/widgets/controls.h +++ b/selfdrive/ui/sunnypilot/qt/widgets/controls.h @@ -545,10 +545,8 @@ public: main_layout->removeWidget(title_label); hlayout->addWidget(title_label, 1); } - if (spacingItem != nullptr && main_layout->indexOf(spacingItem) != -1) { - main_layout->removeItem(spacingItem); - spacingItem = nullptr; - } + main_layout->removeItem(spacingItem); + spacingItem = nullptr; } label.setStyleSheet(label_enabled_style); diff --git a/selfdrive/ui/sunnypilot/qt/widgets/expandable_row.cc b/selfdrive/ui/sunnypilot/qt/widgets/expandable_row.cc index b918938d11..b22684a295 100644 --- a/selfdrive/ui/sunnypilot/qt/widgets/expandable_row.cc +++ b/selfdrive/ui/sunnypilot/qt/widgets/expandable_row.cc @@ -14,10 +14,10 @@ ExpandableToggleRow::ExpandableToggleRow(const QString ¶m, const QString &ti QObject::connect(this, &ExpandableToggleRow::toggleFlipped, this, &ExpandableToggleRow::toggleClicked); collapsibleWidget = new QFrame(this); - collapsibleWidget->setContentsMargins(0, 0, 0, 0); collapsibleWidget->setVisible(false); QVBoxLayout *collapsible_layout = new QVBoxLayout(); collapsibleWidget->setLayout(collapsible_layout); + collapsible_layout->setContentsMargins(0, 0, 0, 0); list = new ListWidgetSP(this, false); diff --git a/selfdrive/ui/sunnypilot/ui.cc b/selfdrive/ui/sunnypilot/ui.cc index 7f4fc88235..c021e0e95b 100644 --- a/selfdrive/ui/sunnypilot/ui.cc +++ b/selfdrive/ui/sunnypilot/ui.cc @@ -64,12 +64,16 @@ void ui_update_params_sp(UIStateSP *s) { s->scene.standstill_timer = params.getBool("StandstillTimer"); s->scene.speed_limit_mode = std::atoi(params.get("SpeedLimitMode").c_str()); s->scene.road_name = params.getBool("RoadNameToggle"); + s->scene.trueVEgoUI = params.getBool("TrueVEgoUI"); + s->scene.hideVEgoUI = params.getBool("HideVEgoUI"); // Onroad Screen Brightness s->scene.onroadScreenOffBrightness = std::atoi(params.get("OnroadScreenOffBrightness").c_str()); s->scene.onroadScreenOffControl = params.getBool("OnroadScreenOffControl"); s->scene.onroadScreenOffTimerParam = std::atoi(params.get("OnroadScreenOffTimer").c_str()); s->reset_onroad_sleep_timer(); + + s->scene.turn_signals = params.getBool("ShowTurnSignals"); } void UIStateSP::reset_onroad_sleep_timer() { diff --git a/selfdrive/ui/sunnypilot/ui_scene.h b/selfdrive/ui/sunnypilot/ui_scene.h index 7cfabb15c3..233f1e15de 100644 --- a/selfdrive/ui/sunnypilot/ui_scene.h +++ b/selfdrive/ui/sunnypilot/ui_scene.h @@ -15,4 +15,7 @@ typedef struct UISceneSP : UIScene { int onroadScreenOffBrightness, onroadScreenOffTimer = 0; bool onroadScreenOffControl; int onroadScreenOffTimerParam; + bool trueVEgoUI; + bool hideVEgoUI; + bool turn_signals = false; } UISceneSP; diff --git a/selfdrive/ui/translations/main_ar.ts b/selfdrive/ui/translations/main_ar.ts index ef7110e72e..4048daf74a 100644 --- a/selfdrive/ui/translations/main_ar.ts +++ b/selfdrive/ui/translations/main_ar.ts @@ -133,14 +133,6 @@ Please use caution when using this feature. Only use the blinker when traffic an Brightness - - Brightness - - - - Overrides the brightness of the device. - - Auto (Dark) @@ -149,6 +141,14 @@ Please use caution when using this feature. Only use the blinker when traffic an Auto + + Global Brightness + + + + Overrides the brightness of the device. This applies to both onroad and offroad screens. + + ConfirmationDialog @@ -250,6 +250,14 @@ This only toggles the visibility of the controls; it does not toggle the actual Quickboot mode requires updates to be disabled.<br>Enable 'Disable Updates' in the Software panel first. + + Enable Copyparty service + + + + Copyparty is a very capable file server, you can use it to download your routes, view your logs and even make some edits on some files from your browser. Requires you to connect to your comma locally via it's IP. + + DevicePanel @@ -464,15 +472,6 @@ Steering lag calibration is complete. Wake-Up Behavior - - Interactivity Timeout - - - - Apply a custom timeout for settings UI. -This is the time after which settings UI closes automatically if user is not interacting with the screen. - - Reboot إعادة التشغيل @@ -517,10 +516,6 @@ This is the time after which settings UI closes automatically if user is not int Exit Always Offroad - - Always Offroad - - ⁍ Default: Device will boot/wake-up normally & will be ready to engage. @@ -533,6 +528,34 @@ This is the time after which settings UI closes automatically if user is not int Controls state of the device after boot/sleep. + + Onroad Uploads + + + + Enable Always Offroad + + + + + DisplayPanel + + Onroad Screen: Reduced Brightness + + + + Turn off device screen or reduce brightness after driving starts. It automatically brightens again when screen is touched or a visible alert is displayed. + + + + Interactivity Timeout + + + + Apply a custom timeout for settings UI. +This is the time after which settings UI closes automatically if user is not interacting with the screen. + + DriveStats @@ -594,6 +617,61 @@ This is the time after which settings UI closes automatically if user is not int تشغيل وضع الراحة + + ExternalStorageControl + + External Storage + + + + Extend your comma device's storage by inserting a USB drive into the aux port. + + + + CHECK + التحقق + + + MOUNT + + + + UNMOUNT + + + + FORMAT + + + + Are you sure you want to format this drive? This will erase all data. + + + + Format + + + + formatting + + + + insert drive + + + + needs format + + + + mounting + + + + unmounting + + + FirehosePanel @@ -649,6 +727,63 @@ Firehose Mode allows you to maximize your training data uploads to improve openp MAX + + HudRendererSP + + km/h + كم/س + + + mph + ميل/س + + + GREEN +LIGHT + + + + LEAD VEHICLE +DEPARTING + + + + SPEED + + + + LIMIT + + + + Near + + + + km + + + + m + + + + mi + + + + ft + + + + AHEAD + + + + MAX + MAX + + HyundaiSettings @@ -767,6 +902,18 @@ Firehose Mode allows you to maximize your training data uploads to improve openp This platform supports limited MADS settings. + + Enforce Torque Lateral Control + + + + Enable this to enforce sunnypilot to steer with Torque lateral control. + + + + Customize Params + + LongitudinalPanel @@ -790,6 +937,34 @@ Firehose Mode allows you to maximize your training data uploads to improve openp Start the vehicle to check vehicle compatibility. + + Intelligent Cruise Button Management (ICBM) (Alpha) + + + + When enabled, sunnypilot will attempt to manage the built-in cruise control buttons by emulating button presses for limited longitudinal control. + + + + Smart Cruise Control - Vision + + + + Use vision path predictions to estimate the appropriate speed to drive through turns ahead. + + + + Smart Cruise Control - Map + + + + Use map data to estimate the appropriate speed to drive through turns ahead. + + + + Speed Limit + + MadsSettings @@ -1048,6 +1223,18 @@ The default software delay value is 0.2 Total Delay: + + Use Lane Turn Desires + + + + Adjust Lane Turn Speed + + + + Set the maximum speed for lane turn desires. Default is 19 %1. + + MultiOptionDialog @@ -1169,10 +1356,6 @@ The default software delay value is 0.2 An update to your device's operating system is downloading in the background. You will be prompted to update when it's ready to install. يتم تنزيل تحديث لنظام تشغيل جهازك في الخلفية. سيطلَب منك التحديث عندما يصبح جاهزاً للتثبيت. - - NVMe drive not mounted. - محرك NVMe غير مثبَّت. - Device failed to register with the comma.ai backend. It will not connect or upload to comma.ai servers, and receives no support from comma.ai. If this is a device purchased at comma.ai/shop, open a ticket at https://comma.ai/support. @@ -1211,6 +1394,10 @@ The default software delay value is 0.2 %1 + + <b>Unsupported branch detected</b> - The current version of <b><u>%1</u></b> branch is no longer supported on the comma three. Please go to <b>[Device > Software]</b> and install a supported branch with <b><u>-tici</u></b> in the branch name for the comma three. + + OffroadHome @@ -1597,6 +1784,59 @@ Warning: You are on a metered connection! sunnypilot + + None + + + + Fixed + + + + Percent + + + + Car +Only + + + + Map +Only + + + + Car +First + + + + Map +First + + + + Combined +Data + + + + Off + + + + Information + + + + Warning + + + + Assist + + SettingsWindow @@ -1691,6 +1931,10 @@ Warning: You are on a metered connection! Developer المطور + + Display + + SetupWidget @@ -1927,6 +2171,84 @@ Warning: You are on a metered connection! + + SpeedLimitPolicy + + Back + السابق + + + Speed Limit Source + + + + ⦿ Car Only: Use Speed Limit data only from Car + + + + ⦿ Map Only: Use Speed Limit data only from OpenStreetMaps + + + + ⦿ Car First: Use Speed Limit data from Car if available, else use from OpenStreetMaps + + + + ⦿ Map First: Use Speed Limit data from OpenStreetMaps if available, else use from Car + + + + ⦿ Combined: Use combined Speed Limit data from Car & OpenStreetMaps + + + + + SpeedLimitSettings + + Back + السابق + + + Speed Limit + + + + Customize Source + + + + Speed Limit Offset + + + + ⦿ None: No Offset + + + + ⦿ Fixed: Adds a fixed offset [Speed Limit + Offset] + + + + ⦿ Percent: Adds a percent offset [Speed Limit + (Offset % Speed Limit)] + + + + ⦿ Off: Disables the Speed Limit functions. + + + + ⦿ Information: Displays the current road's speed limit. + + + + ⦿ Warning: Provides a warning when exceeding the current road's speed limit. + + + + ⦿ Assist: Adjusts the vehicle's cruise speed based on the current road's speed limit when operating the +/- buttons. + + + SshControl @@ -2309,6 +2631,60 @@ Warning: You are on a metered connection! + + TorqueLateralControlCustomParams + + Manual Real-Time Tuning + + + + Enforces the torque lateral controller to use the fixed values instead of the learned values from Self-Tune. Enabling this toggle overrides Self-Tune values. + + + + Lateral Acceleration Factor + + + + Friction + + + + Real-time and Offline + + + + Offline Only + + + + + TorqueLateralControlSettings + + Self-Tune + + + + Enables self-tune for Torque lateral control for platforms that do not use Torque lateral control by default. + + + + Less Restrict Settings for Self-Tune (Beta) + + + + Less strict settings when using Self-Tune. This allows torqued to be more forgiving when learning values. + + + + Enable Custom Tuning + + + + Enables custom tuning for Torque lateral control. Modifying Lateral Acceleration Factor and Friction below will override the offline values indicated in the YAML files within "opendbc/car/torque_data". The values will also be used live when "Manual Real-Time Tuning" toggle is enabled. + + + TreeOptionDialog @@ -2319,6 +2695,10 @@ Warning: You are on a metered connection! Cancel إلغاء + + Favorites + + VisualsPanel @@ -2362,6 +2742,91 @@ Warning: You are on a metered connection! Display useful metrics below the chevron that tracks the lead car (only applicable to cars with openpilot longitudinal control). + + Enable Tesla Rainbow Mode + + + + A beautiful rainbow effect on the path the model wants to take. + + + + It + + + + does not + + + + affect driving in any way. + + + + Enable Standstill Timer + + + + Show a timer on the HUD when the car is at a standstill. + + + + Display Road Name + + + + Displays the name of the road the car is traveling on. The OpenStreetMap database of the location must be downloaded from the OSM panel to fetch the road name. + + + + Green Traffic Light Alert (Beta) + + + + A chime and on-screen alert will play when the traffic light you are waiting for turns green and you have no vehicle in front of you. + + + + Note: This chime is only designed as a notification. It is the driver's responsibility to observe their environment and make decisions accordingly. + + + + Lead Departure Alert (Beta) + + + + A chime and on-screen alert will play when you are stopped, and the vehicle in front of you start moving. + + + + Speedometer: Always Display True Speed + + + + Always display the true vehicle current speed from wheel speed sensors. + + + + Speedometer: Hide from Onroad Screen + + + + Right + + + + Right && +Bottom + + + + Developer UI + + + + Display real-time parameters and metrics from various sources. + + WiFiPromptWidget diff --git a/selfdrive/ui/translations/main_de.ts b/selfdrive/ui/translations/main_de.ts index dde9241460..3d90dca182 100644 --- a/selfdrive/ui/translations/main_de.ts +++ b/selfdrive/ui/translations/main_de.ts @@ -133,14 +133,6 @@ Please use caution when using this feature. Only use the blinker when traffic an Brightness - - Brightness - - - - Overrides the brightness of the device. - - Auto (Dark) @@ -149,6 +141,14 @@ Please use caution when using this feature. Only use the blinker when traffic an Auto + + Global Brightness + + + + Overrides the brightness of the device. This applies to both onroad and offroad screens. + + ConfirmationDialog @@ -250,6 +250,14 @@ This only toggles the visibility of the controls; it does not toggle the actual Quickboot mode requires updates to be disabled.<br>Enable 'Disable Updates' in the Software panel first. + + Enable Copyparty service + + + + Copyparty is a very capable file server, you can use it to download your routes, view your logs and even make some edits on some files from your browser. Requires you to connect to your comma locally via it's IP. + + DevicePanel @@ -464,15 +472,6 @@ Steering lag calibration is complete. Wake-Up Behavior - - Interactivity Timeout - - - - Apply a custom timeout for settings UI. -This is the time after which settings UI closes automatically if user is not interacting with the screen. - - Reboot Neustart @@ -517,10 +516,6 @@ This is the time after which settings UI closes automatically if user is not int Exit Always Offroad - - Always Offroad - - ⁍ Default: Device will boot/wake-up normally & will be ready to engage. @@ -533,6 +528,34 @@ This is the time after which settings UI closes automatically if user is not int Controls state of the device after boot/sleep. + + Onroad Uploads + + + + Enable Always Offroad + + + + + DisplayPanel + + Onroad Screen: Reduced Brightness + + + + Turn off device screen or reduce brightness after driving starts. It automatically brightens again when screen is touched or a visible alert is displayed. + + + + Interactivity Timeout + + + + Apply a custom timeout for settings UI. +This is the time after which settings UI closes automatically if user is not interacting with the screen. + + DriveStats @@ -594,6 +617,61 @@ This is the time after which settings UI closes automatically if user is not int ENTSPANNTER MODUS AN + + ExternalStorageControl + + External Storage + + + + Extend your comma device's storage by inserting a USB drive into the aux port. + + + + CHECK + ÜBERPRÜFEN + + + MOUNT + + + + UNMOUNT + + + + FORMAT + + + + Are you sure you want to format this drive? This will erase all data. + + + + Format + + + + formatting + + + + insert drive + + + + needs format + + + + mounting + + + + unmounting + + + FirehosePanel @@ -645,6 +723,63 @@ Firehose Mode allows you to maximize your training data uploads to improve openp MAX + + HudRendererSP + + km/h + km/h + + + mph + mph + + + GREEN +LIGHT + + + + LEAD VEHICLE +DEPARTING + + + + SPEED + + + + LIMIT + + + + Near + + + + km + + + + m + + + + mi + + + + ft + + + + AHEAD + + + + MAX + MAX + + HyundaiSettings @@ -759,6 +894,18 @@ Firehose Mode allows you to maximize your training data uploads to improve openp This platform supports limited MADS settings. + + Enforce Torque Lateral Control + + + + Enable this to enforce sunnypilot to steer with Torque lateral control. + + + + Customize Params + + LongitudinalPanel @@ -782,6 +929,34 @@ Firehose Mode allows you to maximize your training data uploads to improve openp Start the vehicle to check vehicle compatibility. + + Intelligent Cruise Button Management (ICBM) (Alpha) + + + + When enabled, sunnypilot will attempt to manage the built-in cruise control buttons by emulating button presses for limited longitudinal control. + + + + Smart Cruise Control - Vision + + + + Use vision path predictions to estimate the appropriate speed to drive through turns ahead. + + + + Smart Cruise Control - Map + + + + Use map data to estimate the appropriate speed to drive through turns ahead. + + + + Speed Limit + + MadsSettings @@ -1040,6 +1215,18 @@ The default software delay value is 0.2 Total Delay: + + Use Lane Turn Desires + + + + Adjust Lane Turn Speed + + + + Set the maximum speed for lane turn desires. Default is 19 %1. + + MultiOptionDialog @@ -1157,10 +1344,6 @@ The default software delay value is 0.2 An update to your device's operating system is downloading in the background. You will be prompted to update when it's ready to install. Ein Update für das Betriebssystem deines Geräts wird im Hintergrund heruntergeladen. Du wirst aufgefordert, das Update zu installieren, sobald es bereit ist. - - NVMe drive not mounted. - NVMe-Laufwerk nicht gemounted. - Device temperature too high. System cooling down before starting. Current internal component temperature: %1 Gerätetemperatur zu hoch. Das System kühlt ab, bevor es startet. Aktuelle interne Komponententemperatur: %1 @@ -1203,6 +1386,10 @@ The default software delay value is 0.2 %1 + + <b>Unsupported branch detected</b> - The current version of <b><u>%1</u></b> branch is no longer supported on the comma three. Please go to <b>[Device > Software]</b> and install a supported branch with <b><u>-tici</u></b> in the branch name for the comma three. + + OffroadHome @@ -1577,6 +1764,59 @@ Warning: You are on a metered connection! sunnypilot + + None + + + + Fixed + + + + Percent + + + + Car +Only + + + + Map +Only + + + + Car +First + + + + Map +First + + + + Combined +Data + + + + Off + + + + Information + + + + Warning + + + + Assist + + SettingsWindow @@ -1671,6 +1911,10 @@ Warning: You are on a metered connection! Developer Entwickler + + Display + + SetupWidget @@ -1909,6 +2153,84 @@ Warning: You are on a metered connection! + + SpeedLimitPolicy + + Back + Zurück + + + Speed Limit Source + + + + ⦿ Car Only: Use Speed Limit data only from Car + + + + ⦿ Map Only: Use Speed Limit data only from OpenStreetMaps + + + + ⦿ Car First: Use Speed Limit data from Car if available, else use from OpenStreetMaps + + + + ⦿ Map First: Use Speed Limit data from OpenStreetMaps if available, else use from Car + + + + ⦿ Combined: Use combined Speed Limit data from Car & OpenStreetMaps + + + + + SpeedLimitSettings + + Back + Zurück + + + Speed Limit + + + + Customize Source + + + + Speed Limit Offset + + + + ⦿ None: No Offset + + + + ⦿ Fixed: Adds a fixed offset [Speed Limit + Offset] + + + + ⦿ Percent: Adds a percent offset [Speed Limit + (Offset % Speed Limit)] + + + + ⦿ Off: Disables the Speed Limit functions. + + + + ⦿ Information: Displays the current road's speed limit. + + + + ⦿ Warning: Provides a warning when exceeding the current road's speed limit. + + + + ⦿ Assist: Adjusts the vehicle's cruise speed based on the current road's speed limit when operating the +/- buttons. + + + SshControl @@ -2291,6 +2613,60 @@ Warning: You are on a metered connection! + + TorqueLateralControlCustomParams + + Manual Real-Time Tuning + + + + Enforces the torque lateral controller to use the fixed values instead of the learned values from Self-Tune. Enabling this toggle overrides Self-Tune values. + + + + Lateral Acceleration Factor + + + + Friction + + + + Real-time and Offline + + + + Offline Only + + + + + TorqueLateralControlSettings + + Self-Tune + + + + Enables self-tune for Torque lateral control for platforms that do not use Torque lateral control by default. + + + + Less Restrict Settings for Self-Tune (Beta) + + + + Less strict settings when using Self-Tune. This allows torqued to be more forgiving when learning values. + + + + Enable Custom Tuning + + + + Enables custom tuning for Torque lateral control. Modifying Lateral Acceleration Factor and Friction below will override the offline values indicated in the YAML files within "opendbc/car/torque_data". The values will also be used live when "Manual Real-Time Tuning" toggle is enabled. + + + TreeOptionDialog @@ -2301,6 +2677,10 @@ Warning: You are on a metered connection! Cancel Abbrechen + + Favorites + + VisualsPanel @@ -2344,6 +2724,91 @@ Warning: You are on a metered connection! Display useful metrics below the chevron that tracks the lead car (only applicable to cars with openpilot longitudinal control). + + Enable Tesla Rainbow Mode + + + + A beautiful rainbow effect on the path the model wants to take. + + + + It + + + + does not + + + + affect driving in any way. + + + + Enable Standstill Timer + + + + Show a timer on the HUD when the car is at a standstill. + + + + Display Road Name + + + + Displays the name of the road the car is traveling on. The OpenStreetMap database of the location must be downloaded from the OSM panel to fetch the road name. + + + + Green Traffic Light Alert (Beta) + + + + A chime and on-screen alert will play when the traffic light you are waiting for turns green and you have no vehicle in front of you. + + + + Note: This chime is only designed as a notification. It is the driver's responsibility to observe their environment and make decisions accordingly. + + + + Lead Departure Alert (Beta) + + + + A chime and on-screen alert will play when you are stopped, and the vehicle in front of you start moving. + + + + Speedometer: Always Display True Speed + + + + Always display the true vehicle current speed from wheel speed sensors. + + + + Speedometer: Hide from Onroad Screen + + + + Right + + + + Right && +Bottom + + + + Developer UI + + + + Display real-time parameters and metrics from various sources. + + WiFiPromptWidget diff --git a/selfdrive/ui/translations/main_es.ts b/selfdrive/ui/translations/main_es.ts index 3b53e7f944..284f63ebf3 100644 --- a/selfdrive/ui/translations/main_es.ts +++ b/selfdrive/ui/translations/main_es.ts @@ -133,14 +133,6 @@ Please use caution when using this feature. Only use the blinker when traffic an Brightness - - Brightness - - - - Overrides the brightness of the device. - - Auto (Dark) @@ -149,6 +141,14 @@ Please use caution when using this feature. Only use the blinker when traffic an Auto + + Global Brightness + + + + Overrides the brightness of the device. This applies to both onroad and offroad screens. + + ConfirmationDialog @@ -250,6 +250,14 @@ This only toggles the visibility of the controls; it does not toggle the actual Quickboot mode requires updates to be disabled.<br>Enable 'Disable Updates' in the Software panel first. + + Enable Copyparty service + + + + Copyparty is a very capable file server, you can use it to download your routes, view your logs and even make some edits on some files from your browser. Requires you to connect to your comma locally via it's IP. + + DevicePanel @@ -468,15 +476,6 @@ La calibración del retraso de la dirección está completa. Wake-Up Behavior - - Interactivity Timeout - - - - Apply a custom timeout for settings UI. -This is the time after which settings UI closes automatically if user is not interacting with the screen. - - Reboot Reiniciar @@ -521,10 +520,6 @@ This is the time after which settings UI closes automatically if user is not int Exit Always Offroad - - Always Offroad - - ⁍ Default: Device will boot/wake-up normally & will be ready to engage. @@ -537,6 +532,34 @@ This is the time after which settings UI closes automatically if user is not int Controls state of the device after boot/sleep. + + Onroad Uploads + + + + Enable Always Offroad + + + + + DisplayPanel + + Onroad Screen: Reduced Brightness + + + + Turn off device screen or reduce brightness after driving starts. It automatically brightens again when screen is touched or a visible alert is displayed. + + + + Interactivity Timeout + + + + Apply a custom timeout for settings UI. +This is the time after which settings UI closes automatically if user is not interacting with the screen. + + DriveStats @@ -598,6 +621,61 @@ This is the time after which settings UI closes automatically if user is not int MODO CHILL + + ExternalStorageControl + + External Storage + + + + Extend your comma device's storage by inserting a USB drive into the aux port. + + + + CHECK + VERIFICAR + + + MOUNT + + + + UNMOUNT + + + + FORMAT + + + + Are you sure you want to format this drive? This will erase all data. + + + + Format + + + + formatting + + + + insert drive + + + + needs format + + + + mounting + + + + unmounting + + + FirehosePanel @@ -649,6 +727,63 @@ Firehose Mode allows you to maximize your training data uploads to improve openp MAX + + HudRendererSP + + km/h + km/h + + + mph + mph + + + GREEN +LIGHT + + + + LEAD VEHICLE +DEPARTING + + + + SPEED + + + + LIMIT + + + + Near + + + + km + + + + m + + + + mi + + + + ft + + + + AHEAD + + + + MAX + MAX + + HyundaiSettings @@ -763,6 +898,18 @@ Firehose Mode allows you to maximize your training data uploads to improve openp This platform supports limited MADS settings. + + Enforce Torque Lateral Control + + + + Enable this to enforce sunnypilot to steer with Torque lateral control. + + + + Customize Params + + LongitudinalPanel @@ -786,6 +933,34 @@ Firehose Mode allows you to maximize your training data uploads to improve openp Start the vehicle to check vehicle compatibility. + + Intelligent Cruise Button Management (ICBM) (Alpha) + + + + When enabled, sunnypilot will attempt to manage the built-in cruise control buttons by emulating button presses for limited longitudinal control. + + + + Smart Cruise Control - Vision + + + + Use vision path predictions to estimate the appropriate speed to drive through turns ahead. + + + + Smart Cruise Control - Map + + + + Use map data to estimate the appropriate speed to drive through turns ahead. + + + + Speed Limit + + MadsSettings @@ -1044,6 +1219,18 @@ The default software delay value is 0.2 Total Delay: + + Use Lane Turn Desires + + + + Adjust Lane Turn Speed + + + + Set the maximum speed for lane turn desires. Default is 19 %1. + + MultiOptionDialog @@ -1165,10 +1352,6 @@ The default software delay value is 0.2 An update to your device's operating system is downloading in the background. You will be prompted to update when it's ready to install. Se está descargando una actualización del sistema operativo de su dispositivo en segundo plano. Se le pedirá que actualice cuando esté listo para instalarse. - - NVMe drive not mounted. - Unidad NVMe no montada. - Device failed to register with the comma.ai backend. It will not connect or upload to comma.ai servers, and receives no support from comma.ai. If this is a device purchased at comma.ai/shop, open a ticket at https://comma.ai/support. @@ -1207,6 +1390,10 @@ The default software delay value is 0.2 %1 + + <b>Unsupported branch detected</b> - The current version of <b><u>%1</u></b> branch is no longer supported on the comma three. Please go to <b>[Device > Software]</b> and install a supported branch with <b><u>-tici</u></b> in the branch name for the comma three. + + OffroadHome @@ -1581,6 +1768,59 @@ Warning: You are on a metered connection! sunnypilot + + None + + + + Fixed + + + + Percent + + + + Car +Only + + + + Map +Only + + + + Car +First + + + + Map +First + + + + Combined +Data + + + + Off + + + + Information + + + + Warning + + + + Assist + + SettingsWindow @@ -1675,6 +1915,10 @@ Warning: You are on a metered connection! Developer Desarrollador + + Display + + SetupWidget @@ -1911,6 +2155,84 @@ Warning: You are on a metered connection! + + SpeedLimitPolicy + + Back + + + + Speed Limit Source + + + + ⦿ Car Only: Use Speed Limit data only from Car + + + + ⦿ Map Only: Use Speed Limit data only from OpenStreetMaps + + + + ⦿ Car First: Use Speed Limit data from Car if available, else use from OpenStreetMaps + + + + ⦿ Map First: Use Speed Limit data from OpenStreetMaps if available, else use from Car + + + + ⦿ Combined: Use combined Speed Limit data from Car & OpenStreetMaps + + + + + SpeedLimitSettings + + Back + + + + Speed Limit + + + + Customize Source + + + + Speed Limit Offset + + + + ⦿ None: No Offset + + + + ⦿ Fixed: Adds a fixed offset [Speed Limit + Offset] + + + + ⦿ Percent: Adds a percent offset [Speed Limit + (Offset % Speed Limit)] + + + + ⦿ Off: Disables the Speed Limit functions. + + + + ⦿ Information: Displays the current road's speed limit. + + + + ⦿ Warning: Provides a warning when exceeding the current road's speed limit. + + + + ⦿ Assist: Adjusts the vehicle's cruise speed based on the current road's speed limit when operating the +/- buttons. + + + SshControl @@ -2293,6 +2615,60 @@ Warning: You are on a metered connection! + + TorqueLateralControlCustomParams + + Manual Real-Time Tuning + + + + Enforces the torque lateral controller to use the fixed values instead of the learned values from Self-Tune. Enabling this toggle overrides Self-Tune values. + + + + Lateral Acceleration Factor + + + + Friction + + + + Real-time and Offline + + + + Offline Only + + + + + TorqueLateralControlSettings + + Self-Tune + + + + Enables self-tune for Torque lateral control for platforms that do not use Torque lateral control by default. + + + + Less Restrict Settings for Self-Tune (Beta) + + + + Less strict settings when using Self-Tune. This allows torqued to be more forgiving when learning values. + + + + Enable Custom Tuning + + + + Enables custom tuning for Torque lateral control. Modifying Lateral Acceleration Factor and Friction below will override the offline values indicated in the YAML files within "opendbc/car/torque_data". The values will also be used live when "Manual Real-Time Tuning" toggle is enabled. + + + TreeOptionDialog @@ -2303,6 +2679,10 @@ Warning: You are on a metered connection! Cancel Cancelar + + Favorites + + VisualsPanel @@ -2346,6 +2726,91 @@ Warning: You are on a metered connection! Display useful metrics below the chevron that tracks the lead car (only applicable to cars with openpilot longitudinal control). + + Enable Tesla Rainbow Mode + + + + A beautiful rainbow effect on the path the model wants to take. + + + + It + + + + does not + + + + affect driving in any way. + + + + Enable Standstill Timer + + + + Show a timer on the HUD when the car is at a standstill. + + + + Display Road Name + + + + Displays the name of the road the car is traveling on. The OpenStreetMap database of the location must be downloaded from the OSM panel to fetch the road name. + + + + Green Traffic Light Alert (Beta) + + + + A chime and on-screen alert will play when the traffic light you are waiting for turns green and you have no vehicle in front of you. + + + + Note: This chime is only designed as a notification. It is the driver's responsibility to observe their environment and make decisions accordingly. + + + + Lead Departure Alert (Beta) + + + + A chime and on-screen alert will play when you are stopped, and the vehicle in front of you start moving. + + + + Speedometer: Always Display True Speed + + + + Always display the true vehicle current speed from wheel speed sensors. + + + + Speedometer: Hide from Onroad Screen + + + + Right + + + + Right && +Bottom + + + + Developer UI + + + + Display real-time parameters and metrics from various sources. + + WiFiPromptWidget diff --git a/selfdrive/ui/translations/main_fr.ts b/selfdrive/ui/translations/main_fr.ts index 45705defd9..c6c998b723 100644 --- a/selfdrive/ui/translations/main_fr.ts +++ b/selfdrive/ui/translations/main_fr.ts @@ -133,14 +133,6 @@ Please use caution when using this feature. Only use the blinker when traffic an Brightness - - Brightness - - - - Overrides the brightness of the device. - - Auto (Dark) @@ -149,6 +141,14 @@ Please use caution when using this feature. Only use the blinker when traffic an Auto + + Global Brightness + + + + Overrides the brightness of the device. This applies to both onroad and offroad screens. + + ConfirmationDialog @@ -250,6 +250,14 @@ This only toggles the visibility of the controls; it does not toggle the actual Quickboot mode requires updates to be disabled.<br>Enable 'Disable Updates' in the Software panel first. + + Enable Copyparty service + + + + Copyparty is a very capable file server, you can use it to download your routes, view your logs and even make some edits on some files from your browser. Requires you to connect to your comma locally via it's IP. + + DevicePanel @@ -464,15 +472,6 @@ Steering lag calibration is complete. Wake-Up Behavior - - Interactivity Timeout - - - - Apply a custom timeout for settings UI. -This is the time after which settings UI closes automatically if user is not interacting with the screen. - - Reboot Redémarrer @@ -517,10 +516,6 @@ This is the time after which settings UI closes automatically if user is not int Exit Always Offroad - - Always Offroad - - ⁍ Default: Device will boot/wake-up normally & will be ready to engage. @@ -533,6 +528,34 @@ This is the time after which settings UI closes automatically if user is not int Controls state of the device after boot/sleep. + + Onroad Uploads + + + + Enable Always Offroad + + + + + DisplayPanel + + Onroad Screen: Reduced Brightness + + + + Turn off device screen or reduce brightness after driving starts. It automatically brightens again when screen is touched or a visible alert is displayed. + + + + Interactivity Timeout + + + + Apply a custom timeout for settings UI. +This is the time after which settings UI closes automatically if user is not interacting with the screen. + + DriveStats @@ -594,6 +617,61 @@ This is the time after which settings UI closes automatically if user is not int MODE DÉTENTE ACTIVÉ + + ExternalStorageControl + + External Storage + + + + Extend your comma device's storage by inserting a USB drive into the aux port. + + + + CHECK + VÉRIFIER + + + MOUNT + + + + UNMOUNT + + + + FORMAT + + + + Are you sure you want to format this drive? This will erase all data. + + + + Format + + + + formatting + + + + insert drive + + + + needs format + + + + mounting + + + + unmounting + + + FirehosePanel @@ -645,6 +723,63 @@ Firehose Mode allows you to maximize your training data uploads to improve openp MAX + + HudRendererSP + + km/h + km/h + + + mph + mi/h + + + GREEN +LIGHT + + + + LEAD VEHICLE +DEPARTING + + + + SPEED + + + + LIMIT + + + + Near + + + + km + + + + m + + + + mi + + + + ft + + + + AHEAD + + + + MAX + MAX + + HyundaiSettings @@ -759,6 +894,18 @@ Firehose Mode allows you to maximize your training data uploads to improve openp This platform supports limited MADS settings. + + Enforce Torque Lateral Control + + + + Enable this to enforce sunnypilot to steer with Torque lateral control. + + + + Customize Params + + LongitudinalPanel @@ -782,6 +929,34 @@ Firehose Mode allows you to maximize your training data uploads to improve openp Start the vehicle to check vehicle compatibility. + + Intelligent Cruise Button Management (ICBM) (Alpha) + + + + When enabled, sunnypilot will attempt to manage the built-in cruise control buttons by emulating button presses for limited longitudinal control. + + + + Smart Cruise Control - Vision + + + + Use vision path predictions to estimate the appropriate speed to drive through turns ahead. + + + + Smart Cruise Control - Map + + + + Use map data to estimate the appropriate speed to drive through turns ahead. + + + + Speed Limit + + MadsSettings @@ -1040,6 +1215,18 @@ The default software delay value is 0.2 Total Delay: + + Use Lane Turn Desires + + + + Adjust Lane Turn Speed + + + + Set the maximum speed for lane turn desires. Default is 19 %1. + + MultiOptionDialog @@ -1161,10 +1348,6 @@ The default software delay value is 0.2 An update to your device's operating system is downloading in the background. You will be prompted to update when it's ready to install. Une mise à jour du système d'exploitation de votre appareil est en cours de téléchargement en arrière-plan. Vous serez invité à effectuer la mise à jour lorsqu'elle sera prête à être installée. - - NVMe drive not mounted. - Le disque NVMe n'est pas monté. - Device failed to register with the comma.ai backend. It will not connect or upload to comma.ai servers, and receives no support from comma.ai. If this is a device purchased at comma.ai/shop, open a ticket at https://comma.ai/support. @@ -1203,6 +1386,10 @@ The default software delay value is 0.2 %1 + + <b>Unsupported branch detected</b> - The current version of <b><u>%1</u></b> branch is no longer supported on the comma three. Please go to <b>[Device > Software]</b> and install a supported branch with <b><u>-tici</u></b> in the branch name for the comma three. + + OffroadHome @@ -1577,6 +1764,59 @@ Warning: You are on a metered connection! sunnypilot + + None + + + + Fixed + + + + Percent + + + + Car +Only + + + + Map +Only + + + + Car +First + + + + Map +First + + + + Combined +Data + + + + Off + + + + Information + + + + Warning + + + + Assist + + SettingsWindow @@ -1671,6 +1911,10 @@ Warning: You are on a metered connection! Developer Dév. + + Display + + SetupWidget @@ -1907,6 +2151,84 @@ Warning: You are on a metered connection! + + SpeedLimitPolicy + + Back + Retour + + + Speed Limit Source + + + + ⦿ Car Only: Use Speed Limit data only from Car + + + + ⦿ Map Only: Use Speed Limit data only from OpenStreetMaps + + + + ⦿ Car First: Use Speed Limit data from Car if available, else use from OpenStreetMaps + + + + ⦿ Map First: Use Speed Limit data from OpenStreetMaps if available, else use from Car + + + + ⦿ Combined: Use combined Speed Limit data from Car & OpenStreetMaps + + + + + SpeedLimitSettings + + Back + Retour + + + Speed Limit + + + + Customize Source + + + + Speed Limit Offset + + + + ⦿ None: No Offset + + + + ⦿ Fixed: Adds a fixed offset [Speed Limit + Offset] + + + + ⦿ Percent: Adds a percent offset [Speed Limit + (Offset % Speed Limit)] + + + + ⦿ Off: Disables the Speed Limit functions. + + + + ⦿ Information: Displays the current road's speed limit. + + + + ⦿ Warning: Provides a warning when exceeding the current road's speed limit. + + + + ⦿ Assist: Adjusts the vehicle's cruise speed based on the current road's speed limit when operating the +/- buttons. + + + SshControl @@ -2289,6 +2611,60 @@ Warning: You are on a metered connection! + + TorqueLateralControlCustomParams + + Manual Real-Time Tuning + + + + Enforces the torque lateral controller to use the fixed values instead of the learned values from Self-Tune. Enabling this toggle overrides Self-Tune values. + + + + Lateral Acceleration Factor + + + + Friction + + + + Real-time and Offline + + + + Offline Only + + + + + TorqueLateralControlSettings + + Self-Tune + + + + Enables self-tune for Torque lateral control for platforms that do not use Torque lateral control by default. + + + + Less Restrict Settings for Self-Tune (Beta) + + + + Less strict settings when using Self-Tune. This allows torqued to be more forgiving when learning values. + + + + Enable Custom Tuning + + + + Enables custom tuning for Torque lateral control. Modifying Lateral Acceleration Factor and Friction below will override the offline values indicated in the YAML files within "opendbc/car/torque_data". The values will also be used live when "Manual Real-Time Tuning" toggle is enabled. + + + TreeOptionDialog @@ -2299,6 +2675,10 @@ Warning: You are on a metered connection! Cancel Annuler + + Favorites + + VisualsPanel @@ -2342,6 +2722,91 @@ Warning: You are on a metered connection! Display useful metrics below the chevron that tracks the lead car (only applicable to cars with openpilot longitudinal control). + + Enable Tesla Rainbow Mode + + + + A beautiful rainbow effect on the path the model wants to take. + + + + It + + + + does not + + + + affect driving in any way. + + + + Enable Standstill Timer + + + + Show a timer on the HUD when the car is at a standstill. + + + + Display Road Name + + + + Displays the name of the road the car is traveling on. The OpenStreetMap database of the location must be downloaded from the OSM panel to fetch the road name. + + + + Green Traffic Light Alert (Beta) + + + + A chime and on-screen alert will play when the traffic light you are waiting for turns green and you have no vehicle in front of you. + + + + Note: This chime is only designed as a notification. It is the driver's responsibility to observe their environment and make decisions accordingly. + + + + Lead Departure Alert (Beta) + + + + A chime and on-screen alert will play when you are stopped, and the vehicle in front of you start moving. + + + + Speedometer: Always Display True Speed + + + + Always display the true vehicle current speed from wheel speed sensors. + + + + Speedometer: Hide from Onroad Screen + + + + Right + + + + Right && +Bottom + + + + Developer UI + + + + Display real-time parameters and metrics from various sources. + + WiFiPromptWidget diff --git a/selfdrive/ui/translations/main_ja.ts b/selfdrive/ui/translations/main_ja.ts index 3faa183954..b6a29a867c 100644 --- a/selfdrive/ui/translations/main_ja.ts +++ b/selfdrive/ui/translations/main_ja.ts @@ -133,14 +133,6 @@ Please use caution when using this feature. Only use the blinker when traffic an Brightness - - Brightness - - - - Overrides the brightness of the device. - - Auto (Dark) @@ -149,6 +141,14 @@ Please use caution when using this feature. Only use the blinker when traffic an Auto + + Global Brightness + + + + Overrides the brightness of the device. This applies to both onroad and offroad screens. + + ConfirmationDialog @@ -250,6 +250,14 @@ This only toggles the visibility of the controls; it does not toggle the actual Quickboot mode requires updates to be disabled.<br>Enable 'Disable Updates' in the Software panel first. + + Enable Copyparty service + + + + Copyparty is a very capable file server, you can use it to download your routes, view your logs and even make some edits on some files from your browser. Requires you to connect to your comma locally via it's IP. + + DevicePanel @@ -468,15 +476,6 @@ Steering lag calibration is complete. Wake-Up Behavior - - Interactivity Timeout - - - - Apply a custom timeout for settings UI. -This is the time after which settings UI closes automatically if user is not interacting with the screen. - - Reboot 再起動 @@ -521,10 +520,6 @@ This is the time after which settings UI closes automatically if user is not int Exit Always Offroad - - Always Offroad - - ⁍ Default: Device will boot/wake-up normally & will be ready to engage. @@ -537,6 +532,34 @@ This is the time after which settings UI closes automatically if user is not int Controls state of the device after boot/sleep. + + Onroad Uploads + + + + Enable Always Offroad + + + + + DisplayPanel + + Onroad Screen: Reduced Brightness + + + + Turn off device screen or reduce brightness after driving starts. It automatically brightens again when screen is touched or a visible alert is displayed. + + + + Interactivity Timeout + + + + Apply a custom timeout for settings UI. +This is the time after which settings UI closes automatically if user is not interacting with the screen. + + DriveStats @@ -598,6 +621,61 @@ This is the time after which settings UI closes automatically if user is not int CHILLモード + + ExternalStorageControl + + External Storage + + + + Extend your comma device's storage by inserting a USB drive into the aux port. + + + + CHECK + 確認 + + + MOUNT + + + + UNMOUNT + + + + FORMAT + + + + Are you sure you want to format this drive? This will erase all data. + + + + Format + + + + formatting + + + + insert drive + + + + needs format + + + + mounting + + + + unmounting + + + FirehosePanel @@ -648,6 +726,63 @@ Firehose Mode allows you to maximize your training data uploads to improve openp 最大速度 + + HudRendererSP + + km/h + km/h + + + mph + mph + + + GREEN +LIGHT + + + + LEAD VEHICLE +DEPARTING + + + + SPEED + + + + LIMIT + + + + Near + + + + km + + + + m + + + + mi + + + + ft + + + + AHEAD + + + + MAX + 最大速度 + + HyundaiSettings @@ -761,6 +896,18 @@ Firehose Mode allows you to maximize your training data uploads to improve openp This platform supports limited MADS settings. + + Enforce Torque Lateral Control + + + + Enable this to enforce sunnypilot to steer with Torque lateral control. + + + + Customize Params + + LongitudinalPanel @@ -784,6 +931,34 @@ Firehose Mode allows you to maximize your training data uploads to improve openp Start the vehicle to check vehicle compatibility. + + Intelligent Cruise Button Management (ICBM) (Alpha) + + + + When enabled, sunnypilot will attempt to manage the built-in cruise control buttons by emulating button presses for limited longitudinal control. + + + + Smart Cruise Control - Vision + + + + Use vision path predictions to estimate the appropriate speed to drive through turns ahead. + + + + Smart Cruise Control - Map + + + + Use map data to estimate the appropriate speed to drive through turns ahead. + + + + Speed Limit + + MadsSettings @@ -1042,6 +1217,18 @@ The default software delay value is 0.2 Total Delay: + + Use Lane Turn Desires + + + + Adjust Lane Turn Speed + + + + Set the maximum speed for lane turn desires. Default is 19 %1. + + MultiOptionDialog @@ -1159,10 +1346,6 @@ The default software delay value is 0.2 An update to your device's operating system is downloading in the background. You will be prompted to update when it's ready to install. オペレーティングシステムがバックグラウンドでダウンロードされています。インストールの準備が整うと更新を促されます。 - - NVMe drive not mounted. - SSDドライブ(NVMe)がマウントされていません。 - Device temperature too high. System cooling down before starting. Current internal component temperature: %1 デバイスの温度が高すぎるためシステム起動前の冷却中です。現在のデバイス内部温度: %1 @@ -1205,6 +1388,10 @@ The default software delay value is 0.2 %1 + + <b>Unsupported branch detected</b> - The current version of <b><u>%1</u></b> branch is no longer supported on the comma three. Please go to <b>[Device > Software]</b> and install a supported branch with <b><u>-tici</u></b> in the branch name for the comma three. + + OffroadHome @@ -1576,6 +1763,59 @@ Warning: You are on a metered connection! sunnypilot + + None + + + + Fixed + + + + Percent + + + + Car +Only + + + + Map +Only + + + + Car +First + + + + Map +First + + + + Combined +Data + + + + Off + + + + Information + + + + Warning + + + + Assist + + SettingsWindow @@ -1670,6 +1910,10 @@ Warning: You are on a metered connection! Developer 開発 + + Display + + SetupWidget @@ -1906,6 +2150,84 @@ Warning: You are on a metered connection! + + SpeedLimitPolicy + + Back + 戻る + + + Speed Limit Source + + + + ⦿ Car Only: Use Speed Limit data only from Car + + + + ⦿ Map Only: Use Speed Limit data only from OpenStreetMaps + + + + ⦿ Car First: Use Speed Limit data from Car if available, else use from OpenStreetMaps + + + + ⦿ Map First: Use Speed Limit data from OpenStreetMaps if available, else use from Car + + + + ⦿ Combined: Use combined Speed Limit data from Car & OpenStreetMaps + + + + + SpeedLimitSettings + + Back + 戻る + + + Speed Limit + + + + Customize Source + + + + Speed Limit Offset + + + + ⦿ None: No Offset + + + + ⦿ Fixed: Adds a fixed offset [Speed Limit + Offset] + + + + ⦿ Percent: Adds a percent offset [Speed Limit + (Offset % Speed Limit)] + + + + ⦿ Off: Disables the Speed Limit functions. + + + + ⦿ Information: Displays the current road's speed limit. + + + + ⦿ Warning: Provides a warning when exceeding the current road's speed limit. + + + + ⦿ Assist: Adjusts the vehicle's cruise speed based on the current road's speed limit when operating the +/- buttons. + + + SshControl @@ -2288,6 +2610,60 @@ Warning: You are on a metered connection! + + TorqueLateralControlCustomParams + + Manual Real-Time Tuning + + + + Enforces the torque lateral controller to use the fixed values instead of the learned values from Self-Tune. Enabling this toggle overrides Self-Tune values. + + + + Lateral Acceleration Factor + + + + Friction + + + + Real-time and Offline + + + + Offline Only + + + + + TorqueLateralControlSettings + + Self-Tune + + + + Enables self-tune for Torque lateral control for platforms that do not use Torque lateral control by default. + + + + Less Restrict Settings for Self-Tune (Beta) + + + + Less strict settings when using Self-Tune. This allows torqued to be more forgiving when learning values. + + + + Enable Custom Tuning + + + + Enables custom tuning for Torque lateral control. Modifying Lateral Acceleration Factor and Friction below will override the offline values indicated in the YAML files within "opendbc/car/torque_data". The values will also be used live when "Manual Real-Time Tuning" toggle is enabled. + + + TreeOptionDialog @@ -2298,6 +2674,10 @@ Warning: You are on a metered connection! Cancel キャンセル + + Favorites + + VisualsPanel @@ -2341,6 +2721,91 @@ Warning: You are on a metered connection! Display useful metrics below the chevron that tracks the lead car (only applicable to cars with openpilot longitudinal control). + + Enable Tesla Rainbow Mode + + + + A beautiful rainbow effect on the path the model wants to take. + + + + It + + + + does not + + + + affect driving in any way. + + + + Enable Standstill Timer + + + + Show a timer on the HUD when the car is at a standstill. + + + + Display Road Name + + + + Displays the name of the road the car is traveling on. The OpenStreetMap database of the location must be downloaded from the OSM panel to fetch the road name. + + + + Green Traffic Light Alert (Beta) + + + + A chime and on-screen alert will play when the traffic light you are waiting for turns green and you have no vehicle in front of you. + + + + Note: This chime is only designed as a notification. It is the driver's responsibility to observe their environment and make decisions accordingly. + + + + Lead Departure Alert (Beta) + + + + A chime and on-screen alert will play when you are stopped, and the vehicle in front of you start moving. + + + + Speedometer: Always Display True Speed + + + + Always display the true vehicle current speed from wheel speed sensors. + + + + Speedometer: Hide from Onroad Screen + + + + Right + + + + Right && +Bottom + + + + Developer UI + + + + Display real-time parameters and metrics from various sources. + + WiFiPromptWidget diff --git a/selfdrive/ui/translations/main_ko.ts b/selfdrive/ui/translations/main_ko.ts index 756cad6045..f3ec6b69e8 100644 --- a/selfdrive/ui/translations/main_ko.ts +++ b/selfdrive/ui/translations/main_ko.ts @@ -134,14 +134,6 @@ Please use caution when using this feature. Only use the blinker when traffic an Brightness - - Brightness - 밝기 - - - Overrides the brightness of the device. - 기기 밝기를 직접 설정합니다. - Auto (Dark) 자동 (어둡게) @@ -150,6 +142,14 @@ Please use caution when using this feature. Only use the blinker when traffic an Auto 자동 + + Global Brightness + + + + Overrides the brightness of the device. This applies to both onroad and offroad screens. + + ConfirmationDialog @@ -254,6 +254,14 @@ This only toggles the visibility of the controls; it does not toggle the actual Quickboot mode requires updates to be disabled.<br>Enable 'Disable Updates' in the Software panel first. 빠른 부팅 모드는 업데이트가 비활성화되어 있어야 합니다.<br>먼저 소프트웨어 패널에서 '업데이트 비활성화'를 활성화하세요. + + Enable Copyparty service + + + + Copyparty is a very capable file server, you can use it to download your routes, view your logs and even make some edits on some files from your browser. Requires you to connect to your comma locally via it's IP. + + DevicePanel @@ -472,16 +480,6 @@ Steering lag calibration is complete. Wake-Up Behavior 깨우기 동작 - - Interactivity Timeout - 상호작용 타임아웃 - - - Apply a custom timeout for settings UI. -This is the time after which settings UI closes automatically if user is not interacting with the screen. - 설정 화면에 사용자 지정 타임아웃을 적용하세요. -사용자가 화면과 상호작용하지 않으면 설정 화면이 자동으로 닫히는 시간입니다. - Reboot 재부팅 @@ -526,10 +524,6 @@ This is the time after which settings UI closes automatically if user is not int Exit Always Offroad 항상 오프로드 종료 - - Always Offroad - 항상 오프로드 - ⁍ Default: Device will boot/wake-up normally & will be ready to engage. ⁍ 기본값: 기기가 정상적으로 부팅/절전 모드에서 해제되며, 작동 준비가 완료됩니다. @@ -542,6 +536,35 @@ This is the time after which settings UI closes automatically if user is not int Controls state of the device after boot/sleep. 부팅/절전 모드 후 기기의 상태를 제어합니다. + + Onroad Uploads + + + + Enable Always Offroad + + + + + DisplayPanel + + Onroad Screen: Reduced Brightness + + + + Turn off device screen or reduce brightness after driving starts. It automatically brightens again when screen is touched or a visible alert is displayed. + + + + Interactivity Timeout + 상호작용 타임아웃 + + + Apply a custom timeout for settings UI. +This is the time after which settings UI closes automatically if user is not interacting with the screen. + 설정 화면에 사용자 지정 타임아웃을 적용하세요. +사용자가 화면과 상호작용하지 않으면 설정 화면이 자동으로 닫히는 시간입니다. + DriveStats @@ -603,6 +626,61 @@ This is the time after which settings UI closes automatically if user is not int 안정 모드 켜짐 + + ExternalStorageControl + + External Storage + + + + Extend your comma device's storage by inserting a USB drive into the aux port. + + + + CHECK + 확인 + + + MOUNT + + + + UNMOUNT + + + + FORMAT + + + + Are you sure you want to format this drive? This will erase all data. + + + + Format + + + + formatting + + + + insert drive + + + + needs format + + + + mounting + + + + unmounting + + + FirehosePanel @@ -655,6 +733,63 @@ Firehose 모드를 사용하면 훈련 데이터 업로드를 극대화하여 op 최대 + + HudRendererSP + + km/h + km/h + + + mph + mph + + + GREEN +LIGHT + + + + LEAD VEHICLE +DEPARTING + + + + SPEED + + + + LIMIT + + + + Near + + + + km + + + + m + + + + mi + + + + ft + + + + AHEAD + + + + MAX + 최대 + + HyundaiSettings @@ -768,6 +903,18 @@ Firehose 모드를 사용하면 훈련 데이터 업로드를 극대화하여 op This platform supports limited MADS settings. 이 플랫폼은 제한된 MADS 설정을 지원합니다. + + Enforce Torque Lateral Control + + + + Enable this to enforce sunnypilot to steer with Torque lateral control. + + + + Customize Params + + LongitudinalPanel @@ -791,6 +938,34 @@ Firehose 모드를 사용하면 훈련 데이터 업로드를 극대화하여 op Start the vehicle to check vehicle compatibility. 차량 호환성을 확인하려면 차량 시동을 걸어주세요. + + Intelligent Cruise Button Management (ICBM) (Alpha) + + + + When enabled, sunnypilot will attempt to manage the built-in cruise control buttons by emulating button presses for limited longitudinal control. + + + + Smart Cruise Control - Vision + + + + Use vision path predictions to estimate the appropriate speed to drive through turns ahead. + + + + Smart Cruise Control - Map + + + + Use map data to estimate the appropriate speed to drive through turns ahead. + + + + Speed Limit + + MadsSettings @@ -1050,6 +1225,18 @@ The default software delay value is 0.2 Total Delay: + + Use Lane Turn Desires + + + + Adjust Lane Turn Speed + + + + Set the maximum speed for lane turn desires. Default is 19 %1. + + MultiOptionDialog @@ -1167,10 +1354,6 @@ The default software delay value is 0.2 An update to your device's operating system is downloading in the background. You will be prompted to update when it's ready to install. 기기 운영체제 업데이트가 백그라운드에서 다운로드 중입니다. 설치가 준비되면 업데이트를 진행하라는 메시지가 표시됩니다. - - NVMe drive not mounted. - NVMe 드라이브가 마운트되지 않았습니다. - Device temperature too high. System cooling down before starting. Current internal component temperature: %1 기기 온도가 너무 높습니다. 시스템이 시작하기 전에 온도를 낮추고 있습니다. 현재 내부 부품 온도는 %1입니다. @@ -1215,6 +1398,10 @@ The default software delay value is 0.2 %1 + + <b>Unsupported branch detected</b> - The current version of <b><u>%1</u></b> branch is no longer supported on the comma three. Please go to <b>[Device > Software]</b> and install a supported branch with <b><u>-tici</u></b> in the branch name for the comma three. + + OffroadHome @@ -1590,6 +1777,59 @@ Warning: You are on a metered connection! sunnypilot sunnypilot + + None + + + + Fixed + + + + Percent + + + + Car +Only + + + + Map +Only + + + + Car +First + + + + Map +First + + + + Combined +Data + + + + Off + + + + Information + + + + Warning + + + + Assist + + SettingsWindow @@ -1684,6 +1924,10 @@ Warning: You are on a metered connection! Developer 개발자 + + Display + + SetupWidget @@ -1920,6 +2164,84 @@ Warning: You are on a metered connection! 이 설정들을 변경하려면 항상 오프로드 모드를 활성화하거나 차량 시동을 꺼야 합니다. + + SpeedLimitPolicy + + Back + 뒤로 + + + Speed Limit Source + + + + ⦿ Car Only: Use Speed Limit data only from Car + + + + ⦿ Map Only: Use Speed Limit data only from OpenStreetMaps + + + + ⦿ Car First: Use Speed Limit data from Car if available, else use from OpenStreetMaps + + + + ⦿ Map First: Use Speed Limit data from OpenStreetMaps if available, else use from Car + + + + ⦿ Combined: Use combined Speed Limit data from Car & OpenStreetMaps + + + + + SpeedLimitSettings + + Back + 뒤로 + + + Speed Limit + + + + Customize Source + + + + Speed Limit Offset + + + + ⦿ None: No Offset + + + + ⦿ Fixed: Adds a fixed offset [Speed Limit + Offset] + + + + ⦿ Percent: Adds a percent offset [Speed Limit + (Offset % Speed Limit)] + + + + ⦿ Off: Disables the Speed Limit functions. + + + + ⦿ Information: Displays the current road's speed limit. + + + + ⦿ Warning: Provides a warning when exceeding the current road's speed limit. + + + + ⦿ Assist: Adjusts the vehicle's cruise speed based on the current road's speed limit when operating the +/- buttons. + + + SshControl @@ -2302,6 +2624,60 @@ Warning: You are on a metered connection! 실험 모드를 활성화하려면 sunnypilot 가감속 제어(알파) 토글을 켜세요. + + TorqueLateralControlCustomParams + + Manual Real-Time Tuning + + + + Enforces the torque lateral controller to use the fixed values instead of the learned values from Self-Tune. Enabling this toggle overrides Self-Tune values. + + + + Lateral Acceleration Factor + + + + Friction + + + + Real-time and Offline + + + + Offline Only + + + + + TorqueLateralControlSettings + + Self-Tune + + + + Enables self-tune for Torque lateral control for platforms that do not use Torque lateral control by default. + + + + Less Restrict Settings for Self-Tune (Beta) + + + + Less strict settings when using Self-Tune. This allows torqued to be more forgiving when learning values. + + + + Enable Custom Tuning + + + + Enables custom tuning for Torque lateral control. Modifying Lateral Acceleration Factor and Friction below will override the offline values indicated in the YAML files within "opendbc/car/torque_data". The values will also be used live when "Manual Real-Time Tuning" toggle is enabled. + + + TreeOptionDialog @@ -2312,6 +2688,10 @@ Warning: You are on a metered connection! Cancel 취소 + + Favorites + + VisualsPanel @@ -2355,6 +2735,91 @@ Warning: You are on a metered connection! Display useful metrics below the chevron that tracks the lead car (only applicable to cars with openpilot longitudinal control). 앞차를 추적하는 역삼각형 아래에 유용한 측정 지표를 표시합니다. (openpilot 가감속 제어 기능이 있는 차량에만 해당됩니다) + + Enable Tesla Rainbow Mode + + + + A beautiful rainbow effect on the path the model wants to take. + + + + It + + + + does not + + + + affect driving in any way. + + + + Enable Standstill Timer + + + + Show a timer on the HUD when the car is at a standstill. + + + + Display Road Name + + + + Displays the name of the road the car is traveling on. The OpenStreetMap database of the location must be downloaded from the OSM panel to fetch the road name. + + + + Green Traffic Light Alert (Beta) + + + + A chime and on-screen alert will play when the traffic light you are waiting for turns green and you have no vehicle in front of you. + + + + Note: This chime is only designed as a notification. It is the driver's responsibility to observe their environment and make decisions accordingly. + + + + Lead Departure Alert (Beta) + + + + A chime and on-screen alert will play when you are stopped, and the vehicle in front of you start moving. + + + + Speedometer: Always Display True Speed + + + + Always display the true vehicle current speed from wheel speed sensors. + + + + Speedometer: Hide from Onroad Screen + + + + Right + + + + Right && +Bottom + + + + Developer UI + + + + Display real-time parameters and metrics from various sources. + + WiFiPromptWidget diff --git a/selfdrive/ui/translations/main_pt-BR.ts b/selfdrive/ui/translations/main_pt-BR.ts index 0a886d435c..e820f472af 100644 --- a/selfdrive/ui/translations/main_pt-BR.ts +++ b/selfdrive/ui/translations/main_pt-BR.ts @@ -133,14 +133,6 @@ Please use caution when using this feature. Only use the blinker when traffic an Brightness - - Brightness - - - - Overrides the brightness of the device. - - Auto (Dark) @@ -149,6 +141,14 @@ Please use caution when using this feature. Only use the blinker when traffic an Auto + + Global Brightness + + + + Overrides the brightness of the device. This applies to both onroad and offroad screens. + + ConfirmationDialog @@ -250,6 +250,14 @@ This only toggles the visibility of the controls; it does not toggle the actual Quickboot mode requires updates to be disabled.<br>Enable 'Disable Updates' in the Software panel first. + + Enable Copyparty service + + + + Copyparty is a very capable file server, you can use it to download your routes, view your logs and even make some edits on some files from your browser. Requires you to connect to your comma locally via it's IP. + + DevicePanel @@ -468,15 +476,6 @@ A calibração do atraso da direção foi concluída. Wake-Up Behavior - - Interactivity Timeout - - - - Apply a custom timeout for settings UI. -This is the time after which settings UI closes automatically if user is not interacting with the screen. - - Reboot Reiniciar @@ -521,10 +520,6 @@ This is the time after which settings UI closes automatically if user is not int Exit Always Offroad - - Always Offroad - - ⁍ Default: Device will boot/wake-up normally & will be ready to engage. @@ -537,6 +532,34 @@ This is the time after which settings UI closes automatically if user is not int Controls state of the device after boot/sleep. + + Onroad Uploads + + + + Enable Always Offroad + + + + + DisplayPanel + + Onroad Screen: Reduced Brightness + + + + Turn off device screen or reduce brightness after driving starts. It automatically brightens again when screen is touched or a visible alert is displayed. + + + + Interactivity Timeout + + + + Apply a custom timeout for settings UI. +This is the time after which settings UI closes automatically if user is not interacting with the screen. + + DriveStats @@ -598,6 +621,61 @@ This is the time after which settings UI closes automatically if user is not int MODO CHILL ON + + ExternalStorageControl + + External Storage + + + + Extend your comma device's storage by inserting a USB drive into the aux port. + + + + CHECK + VERIFICAR + + + MOUNT + + + + UNMOUNT + + + + FORMAT + + + + Are you sure you want to format this drive? This will erase all data. + + + + Format + + + + formatting + + + + insert drive + + + + needs format + + + + mounting + + + + unmounting + + + FirehosePanel @@ -649,6 +727,63 @@ Firehose Mode allows you to maximize your training data uploads to improve openp LIMITE + + HudRendererSP + + km/h + km/h + + + mph + mph + + + GREEN +LIGHT + + + + LEAD VEHICLE +DEPARTING + + + + SPEED + + + + LIMIT + + + + Near + + + + km + + + + m + + + + mi + + + + ft + + + + AHEAD + + + + MAX + LIMITE + + HyundaiSettings @@ -763,6 +898,18 @@ Firehose Mode allows you to maximize your training data uploads to improve openp This platform supports limited MADS settings. + + Enforce Torque Lateral Control + + + + Enable this to enforce sunnypilot to steer with Torque lateral control. + + + + Customize Params + + LongitudinalPanel @@ -786,6 +933,34 @@ Firehose Mode allows you to maximize your training data uploads to improve openp Start the vehicle to check vehicle compatibility. + + Intelligent Cruise Button Management (ICBM) (Alpha) + + + + When enabled, sunnypilot will attempt to manage the built-in cruise control buttons by emulating button presses for limited longitudinal control. + + + + Smart Cruise Control - Vision + + + + Use vision path predictions to estimate the appropriate speed to drive through turns ahead. + + + + Smart Cruise Control - Map + + + + Use map data to estimate the appropriate speed to drive through turns ahead. + + + + Speed Limit + + MadsSettings @@ -1044,6 +1219,18 @@ The default software delay value is 0.2 Total Delay: + + Use Lane Turn Desires + + + + Adjust Lane Turn Speed + + + + Set the maximum speed for lane turn desires. Default is 19 %1. + + MultiOptionDialog @@ -1161,10 +1348,6 @@ The default software delay value is 0.2 An update to your device's operating system is downloading in the background. You will be prompted to update when it's ready to install. Uma atualização para o sistema operacional do seu dispositivo está sendo baixada em segundo plano. Você será solicitado a atualizar quando estiver pronto para instalar. - - NVMe drive not mounted. - Unidade NVMe não montada. - Device temperature too high. System cooling down before starting. Current internal component temperature: %1 Temperatura do dispositivo muito alta. O sistema está sendo resfriado antes de iniciar. A temperatura atual do componente interno é: %1 @@ -1207,6 +1390,10 @@ The default software delay value is 0.2 %1 + + <b>Unsupported branch detected</b> - The current version of <b><u>%1</u></b> branch is no longer supported on the comma three. Please go to <b>[Device > Software]</b> and install a supported branch with <b><u>-tici</u></b> in the branch name for the comma three. + + OffroadHome @@ -1581,6 +1768,59 @@ Warning: You are on a metered connection! sunnypilot + + None + + + + Fixed + + + + Percent + + + + Car +Only + + + + Map +Only + + + + Car +First + + + + Map +First + + + + Combined +Data + + + + Off + + + + Information + + + + Warning + + + + Assist + + SettingsWindow @@ -1675,6 +1915,10 @@ Warning: You are on a metered connection! Developer Desenvdor + + Display + + SetupWidget @@ -1911,6 +2155,84 @@ Warning: You are on a metered connection! + + SpeedLimitPolicy + + Back + Voltar + + + Speed Limit Source + + + + ⦿ Car Only: Use Speed Limit data only from Car + + + + ⦿ Map Only: Use Speed Limit data only from OpenStreetMaps + + + + ⦿ Car First: Use Speed Limit data from Car if available, else use from OpenStreetMaps + + + + ⦿ Map First: Use Speed Limit data from OpenStreetMaps if available, else use from Car + + + + ⦿ Combined: Use combined Speed Limit data from Car & OpenStreetMaps + + + + + SpeedLimitSettings + + Back + Voltar + + + Speed Limit + + + + Customize Source + + + + Speed Limit Offset + + + + ⦿ None: No Offset + + + + ⦿ Fixed: Adds a fixed offset [Speed Limit + Offset] + + + + ⦿ Percent: Adds a percent offset [Speed Limit + (Offset % Speed Limit)] + + + + ⦿ Off: Disables the Speed Limit functions. + + + + ⦿ Information: Displays the current road's speed limit. + + + + ⦿ Warning: Provides a warning when exceeding the current road's speed limit. + + + + ⦿ Assist: Adjusts the vehicle's cruise speed based on the current road's speed limit when operating the +/- buttons. + + + SshControl @@ -2293,6 +2615,60 @@ Warning: You are on a metered connection! + + TorqueLateralControlCustomParams + + Manual Real-Time Tuning + + + + Enforces the torque lateral controller to use the fixed values instead of the learned values from Self-Tune. Enabling this toggle overrides Self-Tune values. + + + + Lateral Acceleration Factor + + + + Friction + + + + Real-time and Offline + + + + Offline Only + + + + + TorqueLateralControlSettings + + Self-Tune + + + + Enables self-tune for Torque lateral control for platforms that do not use Torque lateral control by default. + + + + Less Restrict Settings for Self-Tune (Beta) + + + + Less strict settings when using Self-Tune. This allows torqued to be more forgiving when learning values. + + + + Enable Custom Tuning + + + + Enables custom tuning for Torque lateral control. Modifying Lateral Acceleration Factor and Friction below will override the offline values indicated in the YAML files within "opendbc/car/torque_data". The values will also be used live when "Manual Real-Time Tuning" toggle is enabled. + + + TreeOptionDialog @@ -2303,6 +2679,10 @@ Warning: You are on a metered connection! Cancel Cancelar + + Favorites + + VisualsPanel @@ -2346,6 +2726,91 @@ Warning: You are on a metered connection! Display useful metrics below the chevron that tracks the lead car (only applicable to cars with openpilot longitudinal control). + + Enable Tesla Rainbow Mode + + + + A beautiful rainbow effect on the path the model wants to take. + + + + It + + + + does not + + + + affect driving in any way. + + + + Enable Standstill Timer + + + + Show a timer on the HUD when the car is at a standstill. + + + + Display Road Name + + + + Displays the name of the road the car is traveling on. The OpenStreetMap database of the location must be downloaded from the OSM panel to fetch the road name. + + + + Green Traffic Light Alert (Beta) + + + + A chime and on-screen alert will play when the traffic light you are waiting for turns green and you have no vehicle in front of you. + + + + Note: This chime is only designed as a notification. It is the driver's responsibility to observe their environment and make decisions accordingly. + + + + Lead Departure Alert (Beta) + + + + A chime and on-screen alert will play when you are stopped, and the vehicle in front of you start moving. + + + + Speedometer: Always Display True Speed + + + + Always display the true vehicle current speed from wheel speed sensors. + + + + Speedometer: Hide from Onroad Screen + + + + Right + + + + Right && +Bottom + + + + Developer UI + + + + Display real-time parameters and metrics from various sources. + + WiFiPromptWidget diff --git a/selfdrive/ui/translations/main_th.ts b/selfdrive/ui/translations/main_th.ts index 7b89f2a694..67a5a5eaeb 100644 --- a/selfdrive/ui/translations/main_th.ts +++ b/selfdrive/ui/translations/main_th.ts @@ -133,14 +133,6 @@ Please use caution when using this feature. Only use the blinker when traffic an Brightness - - Brightness - - - - Overrides the brightness of the device. - - Auto (Dark) @@ -149,6 +141,14 @@ Please use caution when using this feature. Only use the blinker when traffic an Auto + + Global Brightness + + + + Overrides the brightness of the device. This applies to both onroad and offroad screens. + + ConfirmationDialog @@ -250,6 +250,14 @@ This only toggles the visibility of the controls; it does not toggle the actual Quickboot mode requires updates to be disabled.<br>Enable 'Disable Updates' in the Software panel first. + + Enable Copyparty service + + + + Copyparty is a very capable file server, you can use it to download your routes, view your logs and even make some edits on some files from your browser. Requires you to connect to your comma locally via it's IP. + + DevicePanel @@ -464,15 +472,6 @@ Steering lag calibration is complete. Wake-Up Behavior - - Interactivity Timeout - - - - Apply a custom timeout for settings UI. -This is the time after which settings UI closes automatically if user is not interacting with the screen. - - Reboot รีบูต @@ -517,10 +516,6 @@ This is the time after which settings UI closes automatically if user is not int Exit Always Offroad - - Always Offroad - - ⁍ Default: Device will boot/wake-up normally & will be ready to engage. @@ -533,6 +528,34 @@ This is the time after which settings UI closes automatically if user is not int Controls state of the device after boot/sleep. + + Onroad Uploads + + + + Enable Always Offroad + + + + + DisplayPanel + + Onroad Screen: Reduced Brightness + + + + Turn off device screen or reduce brightness after driving starts. It automatically brightens again when screen is touched or a visible alert is displayed. + + + + Interactivity Timeout + + + + Apply a custom timeout for settings UI. +This is the time after which settings UI closes automatically if user is not interacting with the screen. + + DriveStats @@ -594,6 +617,61 @@ This is the time after which settings UI closes automatically if user is not int คุณกำลังใช้โหมดชิล + + ExternalStorageControl + + External Storage + + + + Extend your comma device's storage by inserting a USB drive into the aux port. + + + + CHECK + ตรวจสอบ + + + MOUNT + + + + UNMOUNT + + + + FORMAT + + + + Are you sure you want to format this drive? This will erase all data. + + + + Format + + + + formatting + + + + insert drive + + + + needs format + + + + mounting + + + + unmounting + + + FirehosePanel @@ -644,6 +722,63 @@ Firehose Mode allows you to maximize your training data uploads to improve openp สูงสุด + + HudRendererSP + + km/h + กม./ชม. + + + mph + ไมล์/ชม. + + + GREEN +LIGHT + + + + LEAD VEHICLE +DEPARTING + + + + SPEED + + + + LIMIT + + + + Near + + + + km + + + + m + + + + mi + + + + ft + + + + AHEAD + + + + MAX + สูงสุด + + HyundaiSettings @@ -757,6 +892,18 @@ Firehose Mode allows you to maximize your training data uploads to improve openp This platform supports limited MADS settings. + + Enforce Torque Lateral Control + + + + Enable this to enforce sunnypilot to steer with Torque lateral control. + + + + Customize Params + + LongitudinalPanel @@ -780,6 +927,34 @@ Firehose Mode allows you to maximize your training data uploads to improve openp Start the vehicle to check vehicle compatibility. + + Intelligent Cruise Button Management (ICBM) (Alpha) + + + + When enabled, sunnypilot will attempt to manage the built-in cruise control buttons by emulating button presses for limited longitudinal control. + + + + Smart Cruise Control - Vision + + + + Use vision path predictions to estimate the appropriate speed to drive through turns ahead. + + + + Smart Cruise Control - Map + + + + Use map data to estimate the appropriate speed to drive through turns ahead. + + + + Speed Limit + + MadsSettings @@ -1038,6 +1213,18 @@ The default software delay value is 0.2 Total Delay: + + Use Lane Turn Desires + + + + Adjust Lane Turn Speed + + + + Set the maximum speed for lane turn desires. Default is 19 %1. + + MultiOptionDialog @@ -1159,10 +1346,6 @@ The default software delay value is 0.2 An update to your device's operating system is downloading in the background. You will be prompted to update when it's ready to install. กำลังดาวน์โหลดอัปเดทสำหรับระบบปฏิบัติการอยู่เบื้องหลัง คุณจะได้รับการแจ้งเตือนเมื่อระบบพร้อมสำหรับการติดตั้ง - - NVMe drive not mounted. - ไม่ได้ติดตั้งไดร์ฟ NVMe - Device failed to register with the comma.ai backend. It will not connect or upload to comma.ai servers, and receives no support from comma.ai. If this is a device purchased at comma.ai/shop, open a ticket at https://comma.ai/support. @@ -1201,6 +1384,10 @@ The default software delay value is 0.2 %1 + + <b>Unsupported branch detected</b> - The current version of <b><u>%1</u></b> branch is no longer supported on the comma three. Please go to <b>[Device > Software]</b> and install a supported branch with <b><u>-tici</u></b> in the branch name for the comma three. + + OffroadHome @@ -1572,6 +1759,59 @@ Warning: You are on a metered connection! sunnypilot + + None + + + + Fixed + + + + Percent + + + + Car +Only + + + + Map +Only + + + + Car +First + + + + Map +First + + + + Combined +Data + + + + Off + + + + Information + + + + Warning + + + + Assist + + SettingsWindow @@ -1666,6 +1906,10 @@ Warning: You are on a metered connection! Developer นักพัฒนา + + Display + + SetupWidget @@ -1902,6 +2146,84 @@ Warning: You are on a metered connection! + + SpeedLimitPolicy + + Back + ย้อนกลับ + + + Speed Limit Source + + + + ⦿ Car Only: Use Speed Limit data only from Car + + + + ⦿ Map Only: Use Speed Limit data only from OpenStreetMaps + + + + ⦿ Car First: Use Speed Limit data from Car if available, else use from OpenStreetMaps + + + + ⦿ Map First: Use Speed Limit data from OpenStreetMaps if available, else use from Car + + + + ⦿ Combined: Use combined Speed Limit data from Car & OpenStreetMaps + + + + + SpeedLimitSettings + + Back + ย้อนกลับ + + + Speed Limit + + + + Customize Source + + + + Speed Limit Offset + + + + ⦿ None: No Offset + + + + ⦿ Fixed: Adds a fixed offset [Speed Limit + Offset] + + + + ⦿ Percent: Adds a percent offset [Speed Limit + (Offset % Speed Limit)] + + + + ⦿ Off: Disables the Speed Limit functions. + + + + ⦿ Information: Displays the current road's speed limit. + + + + ⦿ Warning: Provides a warning when exceeding the current road's speed limit. + + + + ⦿ Assist: Adjusts the vehicle's cruise speed based on the current road's speed limit when operating the +/- buttons. + + + SshControl @@ -2284,6 +2606,60 @@ Warning: You are on a metered connection! + + TorqueLateralControlCustomParams + + Manual Real-Time Tuning + + + + Enforces the torque lateral controller to use the fixed values instead of the learned values from Self-Tune. Enabling this toggle overrides Self-Tune values. + + + + Lateral Acceleration Factor + + + + Friction + + + + Real-time and Offline + + + + Offline Only + + + + + TorqueLateralControlSettings + + Self-Tune + + + + Enables self-tune for Torque lateral control for platforms that do not use Torque lateral control by default. + + + + Less Restrict Settings for Self-Tune (Beta) + + + + Less strict settings when using Self-Tune. This allows torqued to be more forgiving when learning values. + + + + Enable Custom Tuning + + + + Enables custom tuning for Torque lateral control. Modifying Lateral Acceleration Factor and Friction below will override the offline values indicated in the YAML files within "opendbc/car/torque_data". The values will also be used live when "Manual Real-Time Tuning" toggle is enabled. + + + TreeOptionDialog @@ -2294,6 +2670,10 @@ Warning: You are on a metered connection! Cancel ยกเลิก + + Favorites + + VisualsPanel @@ -2337,6 +2717,91 @@ Warning: You are on a metered connection! Display useful metrics below the chevron that tracks the lead car (only applicable to cars with openpilot longitudinal control). + + Enable Tesla Rainbow Mode + + + + A beautiful rainbow effect on the path the model wants to take. + + + + It + + + + does not + + + + affect driving in any way. + + + + Enable Standstill Timer + + + + Show a timer on the HUD when the car is at a standstill. + + + + Display Road Name + + + + Displays the name of the road the car is traveling on. The OpenStreetMap database of the location must be downloaded from the OSM panel to fetch the road name. + + + + Green Traffic Light Alert (Beta) + + + + A chime and on-screen alert will play when the traffic light you are waiting for turns green and you have no vehicle in front of you. + + + + Note: This chime is only designed as a notification. It is the driver's responsibility to observe their environment and make decisions accordingly. + + + + Lead Departure Alert (Beta) + + + + A chime and on-screen alert will play when you are stopped, and the vehicle in front of you start moving. + + + + Speedometer: Always Display True Speed + + + + Always display the true vehicle current speed from wheel speed sensors. + + + + Speedometer: Hide from Onroad Screen + + + + Right + + + + Right && +Bottom + + + + Developer UI + + + + Display real-time parameters and metrics from various sources. + + WiFiPromptWidget diff --git a/selfdrive/ui/translations/main_tr.ts b/selfdrive/ui/translations/main_tr.ts index 0598d08364..923ab69139 100644 --- a/selfdrive/ui/translations/main_tr.ts +++ b/selfdrive/ui/translations/main_tr.ts @@ -133,14 +133,6 @@ Please use caution when using this feature. Only use the blinker when traffic an Brightness - - Brightness - - - - Overrides the brightness of the device. - - Auto (Dark) @@ -149,6 +141,14 @@ Please use caution when using this feature. Only use the blinker when traffic an Auto + + Global Brightness + + + + Overrides the brightness of the device. This applies to both onroad and offroad screens. + + ConfirmationDialog @@ -250,6 +250,14 @@ This only toggles the visibility of the controls; it does not toggle the actual Quickboot mode requires updates to be disabled.<br>Enable 'Disable Updates' in the Software panel first. + + Enable Copyparty service + + + + Copyparty is a very capable file server, you can use it to download your routes, view your logs and even make some edits on some files from your browser. Requires you to connect to your comma locally via it's IP. + + DevicePanel @@ -464,15 +472,6 @@ Steering lag calibration is complete. Wake-Up Behavior - - Interactivity Timeout - - - - Apply a custom timeout for settings UI. -This is the time after which settings UI closes automatically if user is not interacting with the screen. - - Reboot Yeniden başlat @@ -517,10 +516,6 @@ This is the time after which settings UI closes automatically if user is not int Exit Always Offroad - - Always Offroad - - ⁍ Default: Device will boot/wake-up normally & will be ready to engage. @@ -533,6 +528,34 @@ This is the time after which settings UI closes automatically if user is not int Controls state of the device after boot/sleep. + + Onroad Uploads + + + + Enable Always Offroad + + + + + DisplayPanel + + Onroad Screen: Reduced Brightness + + + + Turn off device screen or reduce brightness after driving starts. It automatically brightens again when screen is touched or a visible alert is displayed. + + + + Interactivity Timeout + + + + Apply a custom timeout for settings UI. +This is the time after which settings UI closes automatically if user is not interacting with the screen. + + DriveStats @@ -594,6 +617,61 @@ This is the time after which settings UI closes automatically if user is not int + + ExternalStorageControl + + External Storage + + + + Extend your comma device's storage by inserting a USB drive into the aux port. + + + + CHECK + KONTROL ET + + + MOUNT + + + + UNMOUNT + + + + FORMAT + + + + Are you sure you want to format this drive? This will erase all data. + + + + Format + + + + formatting + + + + insert drive + + + + needs format + + + + mounting + + + + unmounting + + + FirehosePanel @@ -644,6 +722,63 @@ Firehose Mode allows you to maximize your training data uploads to improve openp MAX + + HudRendererSP + + km/h + km/h + + + mph + mph + + + GREEN +LIGHT + + + + LEAD VEHICLE +DEPARTING + + + + SPEED + + + + LIMIT + + + + Near + + + + km + + + + m + + + + mi + + + + ft + + + + AHEAD + + + + MAX + MAX + + HyundaiSettings @@ -757,6 +892,18 @@ Firehose Mode allows you to maximize your training data uploads to improve openp This platform supports limited MADS settings. + + Enforce Torque Lateral Control + + + + Enable this to enforce sunnypilot to steer with Torque lateral control. + + + + Customize Params + + LongitudinalPanel @@ -780,6 +927,34 @@ Firehose Mode allows you to maximize your training data uploads to improve openp Start the vehicle to check vehicle compatibility. + + Intelligent Cruise Button Management (ICBM) (Alpha) + + + + When enabled, sunnypilot will attempt to manage the built-in cruise control buttons by emulating button presses for limited longitudinal control. + + + + Smart Cruise Control - Vision + + + + Use vision path predictions to estimate the appropriate speed to drive through turns ahead. + + + + Smart Cruise Control - Map + + + + Use map data to estimate the appropriate speed to drive through turns ahead. + + + + Speed Limit + + MadsSettings @@ -1038,6 +1213,18 @@ The default software delay value is 0.2 Total Delay: + + Use Lane Turn Desires + + + + Adjust Lane Turn Speed + + + + Set the maximum speed for lane turn desires. Default is 19 %1. + + MultiOptionDialog @@ -1158,10 +1345,6 @@ The default software delay value is 0.2 An update to your device's operating system is downloading in the background. You will be prompted to update when it's ready to install. - - NVMe drive not mounted. - - Device failed to register with the comma.ai backend. It will not connect or upload to comma.ai servers, and receives no support from comma.ai. If this is a device purchased at comma.ai/shop, open a ticket at https://comma.ai/support. @@ -1200,6 +1383,10 @@ The default software delay value is 0.2 %1 + + <b>Unsupported branch detected</b> - The current version of <b><u>%1</u></b> branch is no longer supported on the comma three. Please go to <b>[Device > Software]</b> and install a supported branch with <b><u>-tici</u></b> in the branch name for the comma three. + + OffroadHome @@ -1571,6 +1758,59 @@ Warning: You are on a metered connection! sunnypilot + + None + + + + Fixed + + + + Percent + + + + Car +Only + + + + Map +Only + + + + Car +First + + + + Map +First + + + + Combined +Data + + + + Off + + + + Information + + + + Warning + + + + Assist + + SettingsWindow @@ -1665,6 +1905,10 @@ Warning: You are on a metered connection! Developer + + Display + + SetupWidget @@ -1901,6 +2145,84 @@ Warning: You are on a metered connection! + + SpeedLimitPolicy + + Back + + + + Speed Limit Source + + + + ⦿ Car Only: Use Speed Limit data only from Car + + + + ⦿ Map Only: Use Speed Limit data only from OpenStreetMaps + + + + ⦿ Car First: Use Speed Limit data from Car if available, else use from OpenStreetMaps + + + + ⦿ Map First: Use Speed Limit data from OpenStreetMaps if available, else use from Car + + + + ⦿ Combined: Use combined Speed Limit data from Car & OpenStreetMaps + + + + + SpeedLimitSettings + + Back + + + + Speed Limit + + + + Customize Source + + + + Speed Limit Offset + + + + ⦿ None: No Offset + + + + ⦿ Fixed: Adds a fixed offset [Speed Limit + Offset] + + + + ⦿ Percent: Adds a percent offset [Speed Limit + (Offset % Speed Limit)] + + + + ⦿ Off: Disables the Speed Limit functions. + + + + ⦿ Information: Displays the current road's speed limit. + + + + ⦿ Warning: Provides a warning when exceeding the current road's speed limit. + + + + ⦿ Assist: Adjusts the vehicle's cruise speed based on the current road's speed limit when operating the +/- buttons. + + + SshControl @@ -2283,6 +2605,60 @@ Warning: You are on a metered connection! + + TorqueLateralControlCustomParams + + Manual Real-Time Tuning + + + + Enforces the torque lateral controller to use the fixed values instead of the learned values from Self-Tune. Enabling this toggle overrides Self-Tune values. + + + + Lateral Acceleration Factor + + + + Friction + + + + Real-time and Offline + + + + Offline Only + + + + + TorqueLateralControlSettings + + Self-Tune + + + + Enables self-tune for Torque lateral control for platforms that do not use Torque lateral control by default. + + + + Less Restrict Settings for Self-Tune (Beta) + + + + Less strict settings when using Self-Tune. This allows torqued to be more forgiving when learning values. + + + + Enable Custom Tuning + + + + Enables custom tuning for Torque lateral control. Modifying Lateral Acceleration Factor and Friction below will override the offline values indicated in the YAML files within "opendbc/car/torque_data". The values will also be used live when "Manual Real-Time Tuning" toggle is enabled. + + + TreeOptionDialog @@ -2293,6 +2669,10 @@ Warning: You are on a metered connection! Cancel + + Favorites + + VisualsPanel @@ -2336,6 +2716,91 @@ Warning: You are on a metered connection! Display useful metrics below the chevron that tracks the lead car (only applicable to cars with openpilot longitudinal control). + + Enable Tesla Rainbow Mode + + + + A beautiful rainbow effect on the path the model wants to take. + + + + It + + + + does not + + + + affect driving in any way. + + + + Enable Standstill Timer + + + + Show a timer on the HUD when the car is at a standstill. + + + + Display Road Name + + + + Displays the name of the road the car is traveling on. The OpenStreetMap database of the location must be downloaded from the OSM panel to fetch the road name. + + + + Green Traffic Light Alert (Beta) + + + + A chime and on-screen alert will play when the traffic light you are waiting for turns green and you have no vehicle in front of you. + + + + Note: This chime is only designed as a notification. It is the driver's responsibility to observe their environment and make decisions accordingly. + + + + Lead Departure Alert (Beta) + + + + A chime and on-screen alert will play when you are stopped, and the vehicle in front of you start moving. + + + + Speedometer: Always Display True Speed + + + + Always display the true vehicle current speed from wheel speed sensors. + + + + Speedometer: Hide from Onroad Screen + + + + Right + + + + Right && +Bottom + + + + Developer UI + + + + Display real-time parameters and metrics from various sources. + + WiFiPromptWidget diff --git a/selfdrive/ui/translations/main_zh-CHS.ts b/selfdrive/ui/translations/main_zh-CHS.ts index 1f4db2d6d0..3be9377503 100644 --- a/selfdrive/ui/translations/main_zh-CHS.ts +++ b/selfdrive/ui/translations/main_zh-CHS.ts @@ -133,14 +133,6 @@ Please use caution when using this feature. Only use the blinker when traffic an Brightness - - Brightness - - - - Overrides the brightness of the device. - - Auto (Dark) @@ -149,6 +141,14 @@ Please use caution when using this feature. Only use the blinker when traffic an Auto + + Global Brightness + + + + Overrides the brightness of the device. This applies to both onroad and offroad screens. + + ConfirmationDialog @@ -250,6 +250,14 @@ This only toggles the visibility of the controls; it does not toggle the actual Quickboot mode requires updates to be disabled.<br>Enable 'Disable Updates' in the Software panel first. + + Enable Copyparty service + + + + Copyparty is a very capable file server, you can use it to download your routes, view your logs and even make some edits on some files from your browser. Requires you to connect to your comma locally via it's IP. + + DevicePanel @@ -468,15 +476,6 @@ Steering lag calibration is complete. Wake-Up Behavior - - Interactivity Timeout - - - - Apply a custom timeout for settings UI. -This is the time after which settings UI closes automatically if user is not interacting with the screen. - - Reboot 重启 @@ -521,10 +520,6 @@ This is the time after which settings UI closes automatically if user is not int Exit Always Offroad - - Always Offroad - - ⁍ Default: Device will boot/wake-up normally & will be ready to engage. @@ -537,6 +532,34 @@ This is the time after which settings UI closes automatically if user is not int Controls state of the device after boot/sleep. + + Onroad Uploads + + + + Enable Always Offroad + + + + + DisplayPanel + + Onroad Screen: Reduced Brightness + + + + Turn off device screen or reduce brightness after driving starts. It automatically brightens again when screen is touched or a visible alert is displayed. + + + + Interactivity Timeout + + + + Apply a custom timeout for settings UI. +This is the time after which settings UI closes automatically if user is not interacting with the screen. + + DriveStats @@ -598,6 +621,61 @@ This is the time after which settings UI closes automatically if user is not int 轻松模式运行 + + ExternalStorageControl + + External Storage + + + + Extend your comma device's storage by inserting a USB drive into the aux port. + + + + CHECK + 查看 + + + MOUNT + + + + UNMOUNT + + + + FORMAT + + + + Are you sure you want to format this drive? This will erase all data. + + + + Format + + + + formatting + + + + insert drive + + + + needs format + + + + mounting + + + + unmounting + + + FirehosePanel @@ -648,6 +726,63 @@ Firehose Mode allows you to maximize your training data uploads to improve openp 最高定速 + + HudRendererSP + + km/h + km/h + + + mph + mph + + + GREEN +LIGHT + + + + LEAD VEHICLE +DEPARTING + + + + SPEED + + + + LIMIT + + + + Near + + + + km + + + + m + + + + mi + + + + ft + + + + AHEAD + + + + MAX + 最高定速 + + HyundaiSettings @@ -761,6 +896,18 @@ Firehose Mode allows you to maximize your training data uploads to improve openp This platform supports limited MADS settings. + + Enforce Torque Lateral Control + + + + Enable this to enforce sunnypilot to steer with Torque lateral control. + + + + Customize Params + + LongitudinalPanel @@ -784,6 +931,34 @@ Firehose Mode allows you to maximize your training data uploads to improve openp Start the vehicle to check vehicle compatibility. + + Intelligent Cruise Button Management (ICBM) (Alpha) + + + + When enabled, sunnypilot will attempt to manage the built-in cruise control buttons by emulating button presses for limited longitudinal control. + + + + Smart Cruise Control - Vision + + + + Use vision path predictions to estimate the appropriate speed to drive through turns ahead. + + + + Smart Cruise Control - Map + + + + Use map data to estimate the appropriate speed to drive through turns ahead. + + + + Speed Limit + + MadsSettings @@ -1042,6 +1217,18 @@ The default software delay value is 0.2 Total Delay: + + Use Lane Turn Desires + + + + Adjust Lane Turn Speed + + + + Set the maximum speed for lane turn desires. Default is 19 %1. + + MultiOptionDialog @@ -1159,10 +1346,6 @@ The default software delay value is 0.2 An update to your device's operating system is downloading in the background. You will be prompted to update when it's ready to install. 一个针对您设备的操作系统更新正在后台下载中。当更新准备好安装时,您将收到提示进行更新。 - - NVMe drive not mounted. - NVMe固态硬盘未被挂载。 - Device temperature too high. System cooling down before starting. Current internal component temperature: %1 设备温度过高。系统正在冷却中,等冷却完毕后才会启动。目前内部组件温度:%1 @@ -1205,6 +1388,10 @@ The default software delay value is 0.2 %1 + + <b>Unsupported branch detected</b> - The current version of <b><u>%1</u></b> branch is no longer supported on the comma three. Please go to <b>[Device > Software]</b> and install a supported branch with <b><u>-tici</u></b> in the branch name for the comma three. + + OffroadHome @@ -1576,6 +1763,59 @@ Warning: You are on a metered connection! sunnypilot + + None + + + + Fixed + + + + Percent + + + + Car +Only + + + + Map +Only + + + + Car +First + + + + Map +First + + + + Combined +Data + + + + Off + + + + Information + + + + Warning + + + + Assist + + SettingsWindow @@ -1670,6 +1910,10 @@ Warning: You are on a metered connection! Developer 开发人员 + + Display + + SetupWidget @@ -1906,6 +2150,84 @@ Warning: You are on a metered connection! + + SpeedLimitPolicy + + Back + 返回 + + + Speed Limit Source + + + + ⦿ Car Only: Use Speed Limit data only from Car + + + + ⦿ Map Only: Use Speed Limit data only from OpenStreetMaps + + + + ⦿ Car First: Use Speed Limit data from Car if available, else use from OpenStreetMaps + + + + ⦿ Map First: Use Speed Limit data from OpenStreetMaps if available, else use from Car + + + + ⦿ Combined: Use combined Speed Limit data from Car & OpenStreetMaps + + + + + SpeedLimitSettings + + Back + 返回 + + + Speed Limit + + + + Customize Source + + + + Speed Limit Offset + + + + ⦿ None: No Offset + + + + ⦿ Fixed: Adds a fixed offset [Speed Limit + Offset] + + + + ⦿ Percent: Adds a percent offset [Speed Limit + (Offset % Speed Limit)] + + + + ⦿ Off: Disables the Speed Limit functions. + + + + ⦿ Information: Displays the current road's speed limit. + + + + ⦿ Warning: Provides a warning when exceeding the current road's speed limit. + + + + ⦿ Assist: Adjusts the vehicle's cruise speed based on the current road's speed limit when operating the +/- buttons. + + + SshControl @@ -2288,6 +2610,60 @@ Warning: You are on a metered connection! + + TorqueLateralControlCustomParams + + Manual Real-Time Tuning + + + + Enforces the torque lateral controller to use the fixed values instead of the learned values from Self-Tune. Enabling this toggle overrides Self-Tune values. + + + + Lateral Acceleration Factor + + + + Friction + + + + Real-time and Offline + + + + Offline Only + + + + + TorqueLateralControlSettings + + Self-Tune + + + + Enables self-tune for Torque lateral control for platforms that do not use Torque lateral control by default. + + + + Less Restrict Settings for Self-Tune (Beta) + + + + Less strict settings when using Self-Tune. This allows torqued to be more forgiving when learning values. + + + + Enable Custom Tuning + + + + Enables custom tuning for Torque lateral control. Modifying Lateral Acceleration Factor and Friction below will override the offline values indicated in the YAML files within "opendbc/car/torque_data". The values will also be used live when "Manual Real-Time Tuning" toggle is enabled. + + + TreeOptionDialog @@ -2298,6 +2674,10 @@ Warning: You are on a metered connection! Cancel 取消 + + Favorites + + VisualsPanel @@ -2341,6 +2721,91 @@ Warning: You are on a metered connection! Display useful metrics below the chevron that tracks the lead car (only applicable to cars with openpilot longitudinal control). + + Enable Tesla Rainbow Mode + + + + A beautiful rainbow effect on the path the model wants to take. + + + + It + + + + does not + + + + affect driving in any way. + + + + Enable Standstill Timer + + + + Show a timer on the HUD when the car is at a standstill. + + + + Display Road Name + + + + Displays the name of the road the car is traveling on. The OpenStreetMap database of the location must be downloaded from the OSM panel to fetch the road name. + + + + Green Traffic Light Alert (Beta) + + + + A chime and on-screen alert will play when the traffic light you are waiting for turns green and you have no vehicle in front of you. + + + + Note: This chime is only designed as a notification. It is the driver's responsibility to observe their environment and make decisions accordingly. + + + + Lead Departure Alert (Beta) + + + + A chime and on-screen alert will play when you are stopped, and the vehicle in front of you start moving. + + + + Speedometer: Always Display True Speed + + + + Always display the true vehicle current speed from wheel speed sensors. + + + + Speedometer: Hide from Onroad Screen + + + + Right + + + + Right && +Bottom + + + + Developer UI + + + + Display real-time parameters and metrics from various sources. + + WiFiPromptWidget diff --git a/selfdrive/ui/translations/main_zh-CHT.ts b/selfdrive/ui/translations/main_zh-CHT.ts index 1a8784846c..fac29bed62 100644 --- a/selfdrive/ui/translations/main_zh-CHT.ts +++ b/selfdrive/ui/translations/main_zh-CHT.ts @@ -133,14 +133,6 @@ Please use caution when using this feature. Only use the blinker when traffic an Brightness - - Brightness - - - - Overrides the brightness of the device. - - Auto (Dark) @@ -149,6 +141,14 @@ Please use caution when using this feature. Only use the blinker when traffic an Auto + + Global Brightness + + + + Overrides the brightness of the device. This applies to both onroad and offroad screens. + + ConfirmationDialog @@ -250,6 +250,14 @@ This only toggles the visibility of the controls; it does not toggle the actual Quickboot mode requires updates to be disabled.<br>Enable 'Disable Updates' in the Software panel first. + + Enable Copyparty service + + + + Copyparty is a very capable file server, you can use it to download your routes, view your logs and even make some edits on some files from your browser. Requires you to connect to your comma locally via it's IP. + + DevicePanel @@ -468,15 +476,6 @@ Steering lag calibration is complete. Wake-Up Behavior - - Interactivity Timeout - - - - Apply a custom timeout for settings UI. -This is the time after which settings UI closes automatically if user is not interacting with the screen. - - Reboot 重新啟動 @@ -521,10 +520,6 @@ This is the time after which settings UI closes automatically if user is not int Exit Always Offroad - - Always Offroad - - ⁍ Default: Device will boot/wake-up normally & will be ready to engage. @@ -537,6 +532,34 @@ This is the time after which settings UI closes automatically if user is not int Controls state of the device after boot/sleep. + + Onroad Uploads + + + + Enable Always Offroad + + + + + DisplayPanel + + Onroad Screen: Reduced Brightness + + + + Turn off device screen or reduce brightness after driving starts. It automatically brightens again when screen is touched or a visible alert is displayed. + + + + Interactivity Timeout + + + + Apply a custom timeout for settings UI. +This is the time after which settings UI closes automatically if user is not interacting with the screen. + + DriveStats @@ -598,6 +621,61 @@ This is the time after which settings UI closes automatically if user is not int 輕鬆模式 ON + + ExternalStorageControl + + External Storage + + + + Extend your comma device's storage by inserting a USB drive into the aux port. + + + + CHECK + 檢查 + + + MOUNT + + + + UNMOUNT + + + + FORMAT + + + + Are you sure you want to format this drive? This will erase all data. + + + + Format + + + + formatting + + + + insert drive + + + + needs format + + + + mounting + + + + unmounting + + + FirehosePanel @@ -648,6 +726,63 @@ Firehose Mode allows you to maximize your training data uploads to improve openp 最高 + + HudRendererSP + + km/h + km/h + + + mph + mph + + + GREEN +LIGHT + + + + LEAD VEHICLE +DEPARTING + + + + SPEED + + + + LIMIT + + + + Near + + + + km + + + + m + + + + mi + + + + ft + + + + AHEAD + + + + MAX + 最高 + + HyundaiSettings @@ -761,6 +896,18 @@ Firehose Mode allows you to maximize your training data uploads to improve openp This platform supports limited MADS settings. + + Enforce Torque Lateral Control + + + + Enable this to enforce sunnypilot to steer with Torque lateral control. + + + + Customize Params + + LongitudinalPanel @@ -784,6 +931,34 @@ Firehose Mode allows you to maximize your training data uploads to improve openp Start the vehicle to check vehicle compatibility. + + Intelligent Cruise Button Management (ICBM) (Alpha) + + + + When enabled, sunnypilot will attempt to manage the built-in cruise control buttons by emulating button presses for limited longitudinal control. + + + + Smart Cruise Control - Vision + + + + Use vision path predictions to estimate the appropriate speed to drive through turns ahead. + + + + Smart Cruise Control - Map + + + + Use map data to estimate the appropriate speed to drive through turns ahead. + + + + Speed Limit + + MadsSettings @@ -1042,6 +1217,18 @@ The default software delay value is 0.2 Total Delay: + + Use Lane Turn Desires + + + + Adjust Lane Turn Speed + + + + Set the maximum speed for lane turn desires. Default is 19 %1. + + MultiOptionDialog @@ -1159,10 +1346,6 @@ The default software delay value is 0.2 An update to your device's operating system is downloading in the background. You will be prompted to update when it's ready to install. 一個有關操作系統的更新正在後台下載中。當更新準備好安裝時,您將收到提示進行更新。 - - NVMe drive not mounted. - NVMe 固態硬碟未被掛載。 - Device temperature too high. System cooling down before starting. Current internal component temperature: %1 裝置溫度過高。系統正在冷卻中,等冷卻完畢後才會啟動。目前內部組件溫度:%1 @@ -1205,6 +1388,10 @@ The default software delay value is 0.2 %1 + + <b>Unsupported branch detected</b> - The current version of <b><u>%1</u></b> branch is no longer supported on the comma three. Please go to <b>[Device > Software]</b> and install a supported branch with <b><u>-tici</u></b> in the branch name for the comma three. + + OffroadHome @@ -1576,6 +1763,59 @@ Warning: You are on a metered connection! sunnypilot + + None + + + + Fixed + + + + Percent + + + + Car +Only + + + + Map +Only + + + + Car +First + + + + Map +First + + + + Combined +Data + + + + Off + + + + Information + + + + Warning + + + + Assist + + SettingsWindow @@ -1670,6 +1910,10 @@ Warning: You are on a metered connection! Developer 開發人員 + + Display + + SetupWidget @@ -1906,6 +2150,84 @@ Warning: You are on a metered connection! + + SpeedLimitPolicy + + Back + 回上頁 + + + Speed Limit Source + + + + ⦿ Car Only: Use Speed Limit data only from Car + + + + ⦿ Map Only: Use Speed Limit data only from OpenStreetMaps + + + + ⦿ Car First: Use Speed Limit data from Car if available, else use from OpenStreetMaps + + + + ⦿ Map First: Use Speed Limit data from OpenStreetMaps if available, else use from Car + + + + ⦿ Combined: Use combined Speed Limit data from Car & OpenStreetMaps + + + + + SpeedLimitSettings + + Back + 回上頁 + + + Speed Limit + + + + Customize Source + + + + Speed Limit Offset + + + + ⦿ None: No Offset + + + + ⦿ Fixed: Adds a fixed offset [Speed Limit + Offset] + + + + ⦿ Percent: Adds a percent offset [Speed Limit + (Offset % Speed Limit)] + + + + ⦿ Off: Disables the Speed Limit functions. + + + + ⦿ Information: Displays the current road's speed limit. + + + + ⦿ Warning: Provides a warning when exceeding the current road's speed limit. + + + + ⦿ Assist: Adjusts the vehicle's cruise speed based on the current road's speed limit when operating the +/- buttons. + + + SshControl @@ -2288,6 +2610,60 @@ Warning: You are on a metered connection! + + TorqueLateralControlCustomParams + + Manual Real-Time Tuning + + + + Enforces the torque lateral controller to use the fixed values instead of the learned values from Self-Tune. Enabling this toggle overrides Self-Tune values. + + + + Lateral Acceleration Factor + + + + Friction + + + + Real-time and Offline + + + + Offline Only + + + + + TorqueLateralControlSettings + + Self-Tune + + + + Enables self-tune for Torque lateral control for platforms that do not use Torque lateral control by default. + + + + Less Restrict Settings for Self-Tune (Beta) + + + + Less strict settings when using Self-Tune. This allows torqued to be more forgiving when learning values. + + + + Enable Custom Tuning + + + + Enables custom tuning for Torque lateral control. Modifying Lateral Acceleration Factor and Friction below will override the offline values indicated in the YAML files within "opendbc/car/torque_data". The values will also be used live when "Manual Real-Time Tuning" toggle is enabled. + + + TreeOptionDialog @@ -2298,6 +2674,10 @@ Warning: You are on a metered connection! Cancel 取消 + + Favorites + + VisualsPanel @@ -2341,6 +2721,91 @@ Warning: You are on a metered connection! Display useful metrics below the chevron that tracks the lead car (only applicable to cars with openpilot longitudinal control). + + Enable Tesla Rainbow Mode + + + + A beautiful rainbow effect on the path the model wants to take. + + + + It + + + + does not + + + + affect driving in any way. + + + + Enable Standstill Timer + + + + Show a timer on the HUD when the car is at a standstill. + + + + Display Road Name + + + + Displays the name of the road the car is traveling on. The OpenStreetMap database of the location must be downloaded from the OSM panel to fetch the road name. + + + + Green Traffic Light Alert (Beta) + + + + A chime and on-screen alert will play when the traffic light you are waiting for turns green and you have no vehicle in front of you. + + + + Note: This chime is only designed as a notification. It is the driver's responsibility to observe their environment and make decisions accordingly. + + + + Lead Departure Alert (Beta) + + + + A chime and on-screen alert will play when you are stopped, and the vehicle in front of you start moving. + + + + Speedometer: Always Display True Speed + + + + Always display the true vehicle current speed from wheel speed sensors. + + + + Speedometer: Hide from Onroad Screen + + + + Right + + + + Right && +Bottom + + + + Developer UI + + + + Display real-time parameters and metrics from various sources. + + WiFiPromptWidget diff --git a/sunnypilot/__init__.py b/sunnypilot/__init__.py index ab5441aa71..dd9870597d 100644 --- a/sunnypilot/__init__.py +++ b/sunnypilot/__init__.py @@ -4,4 +4,15 @@ Copyright (c) 2021-, Haibin Wen, sunnypilot, and a number of other contributors. This file is part of sunnypilot and is licensed under the MIT License. See the LICENSE.md file in the root directory for more details. """ + +import hashlib + PARAMS_UPDATE_PERIOD = 3 # seconds + + +def get_file_hash(path: str) -> str: + sha256_hash = hashlib.sha256() + with open(path, "rb") as f: + for byte_block in iter(lambda: f.read(4096), b""): + sha256_hash.update(byte_block) + return sha256_hash.hexdigest() diff --git a/sunnypilot/mapd/mapd_installer.py b/sunnypilot/mapd/mapd_installer.py index e49ff8c64e..08d17376d6 100755 --- a/sunnypilot/mapd/mapd_installer.py +++ b/sunnypilot/mapd/mapd_installer.py @@ -22,7 +22,7 @@ from openpilot.system.version import is_prebuilt from openpilot.sunnypilot.mapd import MAPD_PATH, MAPD_BIN_DIR import openpilot.system.sentry as sentry -VERSION = 'v1.11.0' +VERSION = "v1.12.0" URL = f"https://github.com/pfeiferj/openpilot-mapd/releases/download/{VERSION}/mapd" diff --git a/sunnypilot/mapd/tests/__init__.py b/sunnypilot/mapd/tests/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/sunnypilot/mapd/tests/mapd_hash b/sunnypilot/mapd/tests/mapd_hash new file mode 100644 index 0000000000..0322ea97ca --- /dev/null +++ b/sunnypilot/mapd/tests/mapd_hash @@ -0,0 +1 @@ +fdb3b49ee19956e6ce09fdc3373cbba557f1263b2180e9f344c1d4053852284b \ No newline at end of file diff --git a/sunnypilot/mapd/tests/test_mapd_version.py b/sunnypilot/mapd/tests/test_mapd_version.py new file mode 100644 index 0000000000..5619d2ec29 --- /dev/null +++ b/sunnypilot/mapd/tests/test_mapd_version.py @@ -0,0 +1,19 @@ +""" +Copyright (c) 2021-, Haibin Wen, sunnypilot, and a number of other contributors. + +This file is part of sunnypilot and is licensed under the MIT License. +See the LICENSE.md file in the root directory for more details. +""" +from openpilot.sunnypilot import get_file_hash +from openpilot.sunnypilot.mapd import MAPD_PATH +from openpilot.sunnypilot.mapd.update_version import MAPD_HASH_PATH + + +class TestMapdVersion: + def test_compare_versions(self): + mapd_hash = get_file_hash(MAPD_PATH) + + with open(MAPD_HASH_PATH) as f: + current_hash = f.read().strip() + + assert current_hash == mapd_hash, "Run sunnypilot/mapd/update_version.py to update the current mapd version and hash" diff --git a/sunnypilot/mapd/update_version.py b/sunnypilot/mapd/update_version.py new file mode 100755 index 0000000000..c5e08b3f8f --- /dev/null +++ b/sunnypilot/mapd/update_version.py @@ -0,0 +1,97 @@ +#!/usr/bin/env python3 +""" +Copyright (c) 2021-, Haibin Wen, sunnypilot, and a number of other contributors. + +This file is part of sunnypilot and is licensed under the MIT License. +See the LICENSE.md file in the root directory for more details. +""" +import argparse +import os +import re + +from openpilot.sunnypilot import get_file_hash +from openpilot.common.basedir import BASEDIR +from openpilot.sunnypilot.mapd import MAPD_PATH + +MAPD_HASH_PATH = os.path.join(BASEDIR, "sunnypilot", "mapd", "tests", "mapd_hash") +MAPD_VERSION_PATH = os.path.join(BASEDIR, "sunnypilot", "mapd", "mapd_installer.py") + + +def update_mapd_hash(): + mapd_hash = get_file_hash(MAPD_PATH) + + with open(MAPD_HASH_PATH, "w") as f: + f.write(mapd_hash) + + print(f"Generated and updated new mapd hash to {MAPD_HASH_PATH}") + + +def get_current_mapd_version(path: str) -> str: + print("[GET CURRENT MAPD VERSION]") + with open(path) as f: + for line in f: + if line.strip().startswith("VERSION"): + # Match VERSION = 'v1.11.0' or VERSION="v1.11.0" (with optional spaces) + match = re.search(r'VERSION\s*=\s*[\'"]([^\'"]+)[\'"]', line) + if match: + ver = match.group(1) + print(f'Current mapd version: "{ver}"') + return ver + else: + print("[ERROR] VERSION line found but no quoted value detected.") + return "" + print("[ERROR] VERSION not found in file!") + return "" + + +def update_mapd_version(ver: str, path: str): + print("[CHANGE CURRENT MAPD VERSION]") + + with open(path) as f: + lines = f.readlines() + + found = False + new_lines = [] + for line in lines: + if not found and line.startswith("VERSION ="): + new_lines.append(f'VERSION = "{ver}"\n') + found = True + new_lines.extend(lines[lines.index(line) + 1:]) + break + else: + new_lines.append(line) + + if not found: + print("[ERROR] VERSION line not found! Aborting without writing.") + return + + with open(path, "w") as f: + f.writelines(new_lines) + + print(f'New mapd version: "{ver}"') + print("[DONE]") + + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description="Update mapd version and hash") + parser.add_argument("--new_ver", type=str, help="New mapd version") + args = parser.parse_args() + + if not args.new_ver: + print("Warning: No new mapd version provided. Use --new_ver to specify") + print("Example:") + print(" python sunnypilot/mapd/update_version.py --new_ver \"v1.12.0\"") + print("Current mapd version and hash will not be updated! (aborted)") + exit(0) + + current_ver = get_current_mapd_version(MAPD_VERSION_PATH) + new_ver = f"{args.new_ver}" + if current_ver == new_ver: + print(f'Proposed mapd version: "{new_ver}"') + confirm = input("Proposed mapd version is the same as the current mapd version. Confirm? (y/n): ").upper().strip() + if confirm != "Y": + print("Current mapd version and hash will not be updated! (aborted)") + exit(0) + + update_mapd_version(new_ver, MAPD_VERSION_PATH) + update_mapd_hash() diff --git a/sunnypilot/mapd/version.py b/sunnypilot/mapd/version.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/sunnypilot/models/default_model.py b/sunnypilot/models/default_model.py index 718c910c5c..0260a3c3bc 100755 --- a/sunnypilot/models/default_model.py +++ b/sunnypilot/models/default_model.py @@ -3,6 +3,7 @@ import os import hashlib from openpilot.common.basedir import BASEDIR +from openpilot.sunnypilot import get_file_hash DEFAULT_MODEL_NAME_PATH = os.path.join(BASEDIR, "common", "model.h") MODEL_HASH_PATH = os.path.join(BASEDIR, "sunnypilot", "models", "tests", "model_hash") @@ -10,14 +11,6 @@ VISION_ONNX_PATH = os.path.join(BASEDIR, "selfdrive", "modeld", "models", "drivi POLICY_ONNX_PATH = os.path.join(BASEDIR, "selfdrive", "modeld", "models", "driving_policy.onnx") -def get_file_hash(path: str) -> str: - sha256_hash = hashlib.sha256() - with open(path, "rb") as f: - for byte_block in iter(lambda: f.read(4096), b""): - sha256_hash.update(byte_block) - return sha256_hash.hexdigest() - - def update_model_hash(): vision_hash = get_file_hash(VISION_ONNX_PATH) policy_hash = get_file_hash(POLICY_ONNX_PATH) diff --git a/sunnypilot/models/tests/test_default_model.py b/sunnypilot/models/tests/test_default_model.py index 5067dbaf46..7c2fde70a8 100644 --- a/sunnypilot/models/tests/test_default_model.py +++ b/sunnypilot/models/tests/test_default_model.py @@ -1,4 +1,12 @@ -from openpilot.sunnypilot.models.default_model import get_file_hash, MODEL_HASH_PATH, VISION_ONNX_PATH, POLICY_ONNX_PATH +""" +Copyright (c) 2021-, Haibin Wen, sunnypilot, and a number of other contributors. + +This file is part of sunnypilot and is licensed under the MIT License. +See the LICENSE.md file in the root directory for more details. +""" + +from openpilot.sunnypilot import get_file_hash +from openpilot.sunnypilot.models.default_model import MODEL_HASH_PATH, VISION_ONNX_PATH, POLICY_ONNX_PATH import hashlib diff --git a/sunnypilot/selfdrive/controls/controlsd_ext.py b/sunnypilot/selfdrive/controls/controlsd_ext.py index e0f9326bf8..8caeeaeabc 100644 --- a/sunnypilot/selfdrive/controls/controlsd_ext.py +++ b/sunnypilot/selfdrive/controls/controlsd_ext.py @@ -10,7 +10,6 @@ from cereal import log, custom from opendbc.car import structs from openpilot.common.params import Params from openpilot.common.swaglog import cloudlog -from openpilot.sunnypilot.selfdrive.controls.lib.param_store import ParamStore from openpilot.sunnypilot.selfdrive.controls.lib.blinker_pause_lateral import BlinkerPauseLateral @@ -19,7 +18,6 @@ class ControlsExt: self.CP = CP self.params = params self.blinker_pause_lateral = BlinkerPauseLateral() - self.param_store = ParamStore(self.CP) self.get_params_sp() cloudlog.info("controlsd_ext is waiting for CarParamsSP") @@ -30,7 +28,6 @@ class ControlsExt: self.pm_services_ext = ['carControlSP'] def get_params_sp(self) -> None: - self.param_store.update(self.params) self.blinker_pause_lateral.get_params() def get_lat_active(self, sm: messaging.SubMaster) -> bool: @@ -73,8 +70,6 @@ class ControlsExt: # MADS state CC_SP.mads = sm['selfdriveStateSP'].mads - CC_SP.params = self.param_store.param_list - CC_SP.intelligentCruiseButtonManagement = sm['selfdriveStateSP'].intelligentCruiseButtonManagement return CC_SP diff --git a/sunnypilot/selfdrive/controls/lib/latcontrol_torque_ext_base.py b/sunnypilot/selfdrive/controls/lib/latcontrol_torque_ext_base.py index 1965d50b51..609d2f78b6 100644 --- a/sunnypilot/selfdrive/controls/lib/latcontrol_torque_ext_base.py +++ b/sunnypilot/selfdrive/controls/lib/latcontrol_torque_ext_base.py @@ -58,7 +58,8 @@ class LatControlTorqueExtBase: self.torque_from_lateral_accel_in_torque_space = CI.torque_from_lateral_accel_in_torque_space() self._ff = 0.0 - self._pid = PIDController(0.0, 0.0, k_f=0.0) + self._pid = PIDController(self.torque_params.kp, self.torque_params.ki, + k_f=self.torque_params.kf) self._pid_log = None self._setpoint = 0.0 self._measurement = 0.0 diff --git a/sunnypilot/selfdrive/controls/lib/param_store.py b/sunnypilot/selfdrive/controls/lib/param_store.py deleted file mode 100644 index 785fe9c8f0..0000000000 --- a/sunnypilot/selfdrive/controls/lib/param_store.py +++ /dev/null @@ -1,44 +0,0 @@ -""" -Copyright (c) 2021-, Haibin Wen, sunnypilot, and a number of other contributors. - -This file is part of sunnypilot and is licensed under the MIT License. -See the LICENSE.md file in the root directory for more details. -""" -from cereal import custom -from opendbc.car import structs -from openpilot.common.params import Params - -from sunnypilot.sunnylink.utils import get_param_as_byte - - -class ParamStore: - keys: list[str] - _params: dict[str, custom.CarControlSP.Param] - - def __init__(self, CP: structs.CarParams): - universal_params: list[str] = [] - brand_params: list[str] = [] - - self.keys = universal_params + brand_params - self._params = {} - - self.frame = -1 - - def update(self, params: Params) -> None: - self.frame += 1 - if self.frame % 300 != 0: - return - - for key in self.keys: - param_type = params.get_type(key).name.lower() # Using string instead of number because its "loose" dependency, and could change by OP at anytime. - - # Over engineering opportunity: It's possible this conversion is slow, we may check the value as params returns it for cache purposes. Not today. - param_value = get_param_as_byte(key, params) - if (existing_param := self._params.get(key)) is not None and existing_param.value == param_value: - continue - - self._params[key] = custom.CarControlSP.Param(key=key, value=param_value, type=param_type) - - @property - def param_list(self) -> list[custom.CarControlSP.Param]: - return [v for k,v in self._params.items()] diff --git a/sunnypilot/selfdrive/locationd/torqued_ext.py b/sunnypilot/selfdrive/locationd/torqued_ext.py index 084a82e941..58a23da00e 100644 --- a/sunnypilot/selfdrive/locationd/torqued_ext.py +++ b/sunnypilot/selfdrive/locationd/torqued_ext.py @@ -13,7 +13,7 @@ from openpilot.common.params import Params from openpilot.common.realtime import DT_MDL from openpilot.sunnypilot import PARAMS_UPDATE_PERIOD -RELAXED_MIN_BUCKET_POINTS = np.array([0, 200, 300, 500, 500, 300, 200, 0]) +RELAXED_MIN_BUCKET_POINTS = np.array([1, 200, 300, 500, 500, 300, 200, 1]) ALLOWED_CARS = ['toyota', 'hyundai', 'rivian', 'honda'] diff --git a/sunnypilot/sunnylink/api.py b/sunnypilot/sunnylink/api.py index b7838a40b0..cd2a358c60 100644 --- a/sunnypilot/sunnylink/api.py +++ b/sunnypilot/sunnylink/api.py @@ -147,7 +147,7 @@ class SunnylinkApi(BaseApi): self.params.put("SunnylinkDongleId", sunnylink_dongle_id or UNREGISTERED_SUNNYLINK_DONGLE_ID) # Set the last ping time to the current time since we were just talking to the API - last_ping = int(time.monotonic() * 1e9) if successful_registration else start_time + last_ping = int((time.monotonic() if successful_registration else start_time) * 1e9) Params().put("LastSunnylinkPingTime", last_ping) # Disable sunnylink if registration was not successful diff --git a/sunnypilot/sunnylink/athena/sunnylinkd.py b/sunnypilot/sunnylink/athena/sunnylinkd.py index 25a77c367b..d1b38d656f 100755 --- a/sunnypilot/sunnylink/athena/sunnylinkd.py +++ b/sunnypilot/sunnylink/athena/sunnylinkd.py @@ -178,12 +178,29 @@ def getParamsAllKeys() -> list[str]: return keys +@dispatcher.add_method +def getParamsAllKeysV1() -> dict[str, str]: + available_keys: list[str] = [k.decode('utf-8') for k in Params().all_keys()] + + params_dict: dict[str, list[dict[str, str | bool | int | None]]] = {"params": []} + for key in available_keys: + value = get_param_as_byte(key, get_default=True) + params_dict["params"].append({ + "key": key, + "type": int(params.get_type(key).value), + "default_value": base64.b64encode(value).decode('utf-8') if value else None, + }) + + return {"keys": json.dumps(params_dict.get("params", []))} + + @dispatcher.add_method def getParams(params_keys: list[str], compression: bool = False) -> str | dict[str, str]: params = Params() + available_keys: list[str] = [k.decode('utf-8') for k in Params().all_keys()] try: - param_keys_validated = [key for key in params_keys if key in getParamsAllKeys()] + param_keys_validated = [key for key in params_keys if key in available_keys] params_dict: dict[str, list[dict[str, str | bool | int]]] = {"params": []} for key in param_keys_validated: value = get_param_as_byte(key) diff --git a/sunnypilot/sunnylink/registration_manager.py b/sunnypilot/sunnylink/registration_manager.py index 34323c2789..805d2482db 100755 --- a/sunnypilot/sunnylink/registration_manager.py +++ b/sunnypilot/sunnylink/registration_manager.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 import time +from openpilot.common.params import Params from openpilot.common.realtime import Ratekeeper from openpilot.common.swaglog import cloudlog @@ -12,17 +13,22 @@ NetworkType = log.DeviceState.NetworkType def main(): """The main method is expected to be called by the manager when the device boots up.""" - rk = Ratekeeper(.5) - sm = messaging.SubMaster(['deviceState'], poll='deviceState') - while True: - sm.update(1000) - if sm['deviceState'].networkType != NetworkType.none: - break + try: + rk = Ratekeeper(.5) + sm = messaging.SubMaster(['deviceState'], poll='deviceState') + while True: + sm.update(1000) + if sm['deviceState'].networkType != NetworkType.none: + break - cloudlog.info(f"Waiting to become online... {time.monotonic()}") - rk.keep_time() + cloudlog.info(f"Waiting to become online... {time.monotonic()}") + rk.keep_time() - register_sunnylink() + register_sunnylink() + except Exception: + cloudlog.exception("Sunnylink registration failed") + Params().put_bool("SunnylinkTempFault", True) + raise if __name__ == "__main__": diff --git a/sunnypilot/sunnylink/utils.py b/sunnypilot/sunnylink/utils.py index 91c0788795..e86a795170 100644 --- a/sunnypilot/sunnylink/utils.py +++ b/sunnypilot/sunnylink/utils.py @@ -6,31 +6,32 @@ from openpilot.common.params import Params, ParamKeyType from openpilot.system.version import is_prebuilt -def get_sunnylink_status(params=None) -> tuple[bool, bool]: +def get_sunnylink_status(params=None) -> tuple[bool, bool, bool]: """Get the status of Sunnylink on the device. Returns a tuple of (is_sunnylink_enabled, is_registered).""" params = params or Params() is_sunnylink_enabled = params.get_bool("SunnylinkEnabled") is_registered = params.get("SunnylinkDongleId") not in (None, UNREGISTERED_SUNNYLINK_DONGLE_ID) - return is_sunnylink_enabled, is_registered + is_on_temporary_fault = params.get_bool("SunnylinkTempFault") + return is_sunnylink_enabled, is_registered, is_on_temporary_fault def sunnylink_ready(params=None) -> bool: """Check if the device is ready to communicate with Sunnylink. That means it is enabled and registered.""" params = params or Params() - is_sunnylink_enabled, is_registered = get_sunnylink_status(params) - return is_sunnylink_enabled and is_registered + is_sunnylink_enabled, is_registered, is_on_temporary_fault = get_sunnylink_status(params) + return is_sunnylink_enabled and is_registered and not is_on_temporary_fault def use_sunnylink_uploader(params) -> bool: """Check if the device is ready to use Sunnylink and the uploader is enabled.""" - return sunnylink_ready(params) and params.get_bool("EnableSunnylinkUploader") + return not params.get_bool("NetworkMetered") and sunnylink_ready(params) and params.get_bool("EnableSunnylinkUploader") def sunnylink_need_register(params=None) -> bool: """Check if the device needs to be registered with Sunnylink.""" params = params or Params() - is_sunnylink_enabled, is_registered = get_sunnylink_status(params) - return is_sunnylink_enabled and not is_registered + is_sunnylink_enabled, is_registered, is_on_temporary_fault = get_sunnylink_status(params) + return is_sunnylink_enabled and not is_registered and not is_on_temporary_fault def register_sunnylink(): @@ -47,8 +48,12 @@ def register_sunnylink(): "timeout": 60 } - sunnylink_id = SunnylinkApi(None).register_device(None, **extra_args) - print(f"SunnyLinkId: {sunnylink_id}") + try: + sunnylink_id = SunnylinkApi(None).register_device(None, **extra_args) + print(f"SunnyLinkId: {sunnylink_id}") + except Exception: + Params().put_bool("SunnylinkTempFault", True) + raise def get_api_token(): @@ -60,14 +65,20 @@ def get_api_token(): print(f"API Token: {token}") -def get_param_as_byte(param_name: str, params=None) -> bytes | None: +def get_param_as_byte(param_name: str, params=None, get_default=False) -> bytes | None: """Get a parameter as bytes. Returns None if the parameter does not exist.""" - params = params or Params() # Use existing Params instance if provided - param = params.get(param_name) + params = params or Params() + param = params.get(param_name) if not get_default else params.get_default_value(param_name) + if param is None: return None param_type = params.get_type(param_name) + return _to_bytes(param, param_type) + + +def _to_bytes(param: bytes, param_type: ParamKeyType) -> bytes | None: + """Convert a parameter value to bytes based on its type.""" if param_type == ParamKeyType.BYTES: return bytes(param) elif param_type == ParamKeyType.JSON: diff --git a/system/manager/process_config.py b/system/manager/process_config.py index b1a2fa6e13..c5f20e511b 100644 --- a/system/manager/process_config.py +++ b/system/manager/process_config.py @@ -95,6 +95,12 @@ def is_stock_model(started, params, CP: car.CarParams) -> bool: def mapd_ready(started: bool, params: Params, CP: car.CarParams) -> bool: return bool(os.path.exists(Paths.mapd_root())) +def uploader_ready(started: bool, params: Params, CP: car.CarParams) -> bool: + if not params.get_bool("OnroadUploads"): + return only_offroad(started, params, CP) + + return always_run(started, params, CP) + def or_(*fns): return lambda *args: operator.or_(*(fn(*args) for fn in fns)) @@ -145,7 +151,7 @@ procs = [ PythonProcess("hardwared", "system.hardware.hardwared", always_run), PythonProcess("tombstoned", "system.tombstoned", always_run, enabled=not PC), PythonProcess("updated", "system.updated.updated", only_offroad, enabled=not PC), - PythonProcess("uploader", "system.loggerd.uploader", always_run), + PythonProcess("uploader", "system.loggerd.uploader", uploader_ready), PythonProcess("statsd", "system.statsd", always_run), PythonProcess("feedbackd", "selfdrive.ui.feedback.feedbackd", only_onroad), diff --git a/third_party/mapd_pfeiferj/mapd b/third_party/mapd_pfeiferj/mapd index eb2372ceed..c8b50b0791 100755 Binary files a/third_party/mapd_pfeiferj/mapd and b/third_party/mapd_pfeiferj/mapd differ