Skip to content

Commit

Permalink
Merge branch 'master' into PA-dev2
Browse files Browse the repository at this point in the history
  • Loading branch information
Edison-CBS committed Oct 27, 2024
2 parents 81408fb + 94d10eb commit 3e0bab1
Show file tree
Hide file tree
Showing 29 changed files with 253 additions and 18 deletions.
1 change: 1 addition & 0 deletions .github/workflows/selfdrive_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ jobs:
run: |
${{ env.RUN }} "unset PYTHONWARNINGS && AZURE_TOKEN='$AZURE_TOKEN' python3 selfdrive/test/process_replay/test_processes.py -j$(nproc) --upload-only"
- name: Run regen
if: false
timeout-minutes: 4
run: |
${{ env.RUN }} "ONNXCPU=1 $PYTEST selfdrive/test/process_replay/test_regen.py && \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ui_preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
run: >-
sudo apt-get install -y imagemagick
scenes="homescreen settings_device settings_toggles offroad_alert update_available prime onroad onroad_disengaged onroad_override onroad_sidebar onroad_wide onroad_wide_sidebar onroad_alert_small onroad_alert_mid onroad_alert_full driver_camera body keyboard"
scenes="homescreen settings_device settings_toggles settings_developer offroad_alert update_available prime onroad onroad_disengaged onroad_override onroad_sidebar onroad_wide onroad_wide_sidebar onroad_alert_small onroad_alert_mid onroad_alert_full driver_camera body keyboard"
A=($scenes)
DIFF=""
Expand Down
2 changes: 1 addition & 1 deletion opendbc_repo
2 changes: 1 addition & 1 deletion panda
2 changes: 1 addition & 1 deletion selfdrive/test/process_replay/ref_commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
22530fd1bd915d5b37db900e2ac42a9501cd5972
8f9dba78b0a2a4fbf8122f61d49e9529dba9b3b4
2 changes: 1 addition & 1 deletion selfdrive/ui/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ qt_libs = [widgets, qt_util] + base_libs

qt_src = ["main.cc", "ui.cc", "qt/sidebar.cc", "qt/body.cc",
"qt/window.cc", "qt/home.cc", "qt/offroad/settings.cc",
"qt/offroad/software_settings.cc", "qt/offroad/onboarding.cc",
"qt/offroad/software_settings.cc", "qt/offroad/developer_panel.cc", "qt/offroad/onboarding.cc",
"qt/offroad/driverview.cc", "qt/offroad/experimental_mode.cc",
"qt/onroad/onroad_home.cc", "qt/onroad/annotated_camera.cc", "qt/onroad/model.cc",
"qt/onroad/buttons.cc", "qt/onroad/alerts.cc", "qt/onroad/driver_monitoring.cc", "qt/onroad/hud.cc"]
Expand Down
4 changes: 0 additions & 4 deletions selfdrive/ui/qt/network/networking.cc
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,6 @@ AdvancedNetworking::AdvancedNetworking(QWidget* parent, WifiManager* wifi): QWid
ipLabel = new LabelControl(tr("IP Address"), wifi->ipv4_address);
list->addItem(ipLabel);

// SSH keys
list->addItem(new SshToggle());
list->addItem(new SshControl());

// Roaming toggle
const bool roamingEnabled = params.getBool("GsmRoaming");
roamingToggle = new ToggleControl(tr("Enable Roaming"), "", "", roamingEnabled);
Expand Down
36 changes: 36 additions & 0 deletions selfdrive/ui/qt/offroad/developer_panel.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#include <QDebug>

#include "selfdrive/ui/qt/offroad/developer_panel.h"
#include "selfdrive/ui/qt/widgets/ssh_keys.h"
#include "selfdrive/ui/qt/widgets/controls.h"

DeveloperPanel::DeveloperPanel(SettingsWindow *parent) : ListWidget(parent) {
// SSH keys
addItem(new SshToggle());
addItem(new SshControl());

joystickToggle = new ParamControl("JoystickDebugMode", tr("Joystick Debug Mode"), "", "");
QObject::connect(joystickToggle, &ParamControl::toggleFlipped, [=](bool state) {
params.putBool("LongitudinalManeuverMode", false);
longManeuverToggle->refresh();
});
addItem(joystickToggle);

longManeuverToggle = new ParamControl("LongitudinalManeuverMode", tr("Longitudinal Maneuver Mode"), "", "");
QObject::connect(longManeuverToggle, &ParamControl::toggleFlipped, [=](bool state) {
params.putBool("JoystickDebugMode", false);
joystickToggle->refresh();
});
addItem(longManeuverToggle);

// Joystick and longitudinal maneuvers should be hidden on release branches
// also the toggles should be not available to change in onroad state
const bool is_release = params.getBool("IsReleaseBranch");
QObject::connect(uiState(), &UIState::offroadTransition, [=](bool offroad) {
for (auto btn : findChildren<ParamControl *>()) {
btn->setVisible(!is_release);
btn->setEnabled(offroad);
}
});

}
14 changes: 14 additions & 0 deletions selfdrive/ui/qt/offroad/developer_panel.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#pragma once

#include "selfdrive/ui/qt/offroad/settings.h"

class DeveloperPanel : public ListWidget {
Q_OBJECT
public:
explicit DeveloperPanel(SettingsWindow *parent);

private:
Params params;
ParamControl* joystickToggle;
ParamControl* longManeuverToggle;
};
2 changes: 2 additions & 0 deletions selfdrive/ui/qt/offroad/settings.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "selfdrive/ui/qt/qt_window.h"
#include "selfdrive/ui/qt/widgets/prime.h"
#include "selfdrive/ui/qt/widgets/scrollview.h"
#include "selfdrive/ui/qt/offroad/developer_panel.h"

TogglesPanel::TogglesPanel(SettingsWindow *parent) : ListWidget(parent) {
// param, title, desc, icon
Expand Down Expand Up @@ -393,6 +394,7 @@ SettingsWindow::SettingsWindow(QWidget *parent) : QFrame(parent) {
{tr("Network"), networking},
{tr("Toggles"), toggles},
{tr("Software"), new SoftwarePanel(this)},
{tr("Developer"), new DeveloperPanel(this)},
};

nav_btns = new QButtonGroup(this);
Expand Down
8 changes: 7 additions & 1 deletion selfdrive/ui/tests/test_ui/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ def setup_settings_device(click, pm: PubMaster):

def setup_settings_toggles(click, pm: PubMaster):
setup_settings_device(click, pm)
click(278, 760)
click(278, 650)
time.sleep(UI_DELAY)

def setup_settings_developer(click, pm: PubMaster):
setup_settings_device(click, pm)
click(278, 960)
time.sleep(UI_DELAY)

def setup_onroad(click, pm: PubMaster):
Expand Down Expand Up @@ -175,6 +180,7 @@ def setup_pair_device(click, pm: PubMaster):
"pair_device": setup_pair_device,
"settings_device": setup_settings_device,
"settings_toggles": setup_settings_toggles,
"settings_developer": setup_settings_developer,
"onroad": setup_onroad,
"onroad_disengaged": setup_onroad_disengaged,
"onroad_override": setup_onroad_override,
Expand Down
15 changes: 15 additions & 0 deletions selfdrive/ui/translations/main_ar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,17 @@
<translation>رفض، إلغاء التثبيت %1</translation>
</message>
</context>
<context>
<name>DeveloperPanel</name>
<message>
<source>Joystick Debug Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Longitudinal Maneuver Mode</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DevicePanel</name>
<message>
Expand Down Expand Up @@ -618,6 +629,10 @@ This may take up to a minute.</source>
<source>Software</source>
<translation>البرنامج</translation>
</message>
<message>
<source>Developer</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Setup</name>
Expand Down
15 changes: 15 additions & 0 deletions selfdrive/ui/translations/main_de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,17 @@
<translation>Ablehnen, deinstallieren %1</translation>
</message>
</context>
<context>
<name>DeveloperPanel</name>
<message>
<source>Joystick Debug Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Longitudinal Maneuver Mode</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DevicePanel</name>
<message>
Expand Down Expand Up @@ -600,6 +611,10 @@ This may take up to a minute.</source>
<source>Software</source>
<translation>Software</translation>
</message>
<message>
<source>Developer</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Setup</name>
Expand Down
15 changes: 15 additions & 0 deletions selfdrive/ui/translations/main_es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,17 @@
<translation>Rechazar, desinstalar %1</translation>
</message>
</context>
<context>
<name>DeveloperPanel</name>
<message>
<source>Joystick Debug Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Longitudinal Maneuver Mode</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DevicePanel</name>
<message>
Expand Down Expand Up @@ -602,6 +613,10 @@ Esto puede tardar un minuto.</translation>
<source>Software</source>
<translation>Software</translation>
</message>
<message>
<source>Developer</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Setup</name>
Expand Down
15 changes: 15 additions & 0 deletions selfdrive/ui/translations/main_fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,17 @@
<translation>Refuser, désinstaller %1</translation>
</message>
</context>
<context>
<name>DeveloperPanel</name>
<message>
<source>Joystick Debug Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Longitudinal Maneuver Mode</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DevicePanel</name>
<message>
Expand Down Expand Up @@ -602,6 +613,10 @@ Cela peut prendre jusqu&apos;à une minute.</translation>
<source>Software</source>
<translation>Logiciel</translation>
</message>
<message>
<source>Developer</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Setup</name>
Expand Down
15 changes: 15 additions & 0 deletions selfdrive/ui/translations/main_ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,17 @@
<translation>拒否して %1 をアンインストール</translation>
</message>
</context>
<context>
<name>DeveloperPanel</name>
<message>
<source>Joystick Debug Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Longitudinal Maneuver Mode</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DevicePanel</name>
<message>
Expand Down Expand Up @@ -596,6 +607,10 @@ This may take up to a minute.</source>
<source>Software</source>
<translation>ソフトウェア</translation>
</message>
<message>
<source>Developer</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Setup</name>
Expand Down
15 changes: 15 additions & 0 deletions selfdrive/ui/translations/main_ko.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,17 @@
<translation>거절, %1 제거</translation>
</message>
</context>
<context>
<name>DeveloperPanel</name>
<message>
<source>Joystick Debug Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Longitudinal Maneuver Mode</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DevicePanel</name>
<message>
Expand Down Expand Up @@ -598,6 +609,10 @@ This may take up to a minute.</source>
<source>Software</source>
<translation>소프트웨어</translation>
</message>
<message>
<source>Developer</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Setup</name>
Expand Down
15 changes: 15 additions & 0 deletions selfdrive/ui/translations/main_pt-BR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,17 @@
<translation>Rejeitar, desintalar %1</translation>
</message>
</context>
<context>
<name>DeveloperPanel</name>
<message>
<source>Joystick Debug Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Longitudinal Maneuver Mode</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DevicePanel</name>
<message>
Expand Down Expand Up @@ -602,6 +613,10 @@ Isso pode levar até um minuto.</translation>
<source>Software</source>
<translation>Software</translation>
</message>
<message>
<source>Developer</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Setup</name>
Expand Down
15 changes: 15 additions & 0 deletions selfdrive/ui/translations/main_th.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,17 @@
<translation>ปฏิเสธ และถอนการติดตั้ง %1</translation>
</message>
</context>
<context>
<name>DeveloperPanel</name>
<message>
<source>Joystick Debug Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Longitudinal Maneuver Mode</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DevicePanel</name>
<message>
Expand Down Expand Up @@ -598,6 +609,10 @@ This may take up to a minute.</source>
<source>Software</source>
<translation>ซอฟต์แวร์</translation>
</message>
<message>
<source>Developer</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Setup</name>
Expand Down
15 changes: 15 additions & 0 deletions selfdrive/ui/translations/main_tr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,17 @@
<translation>Reddet, Kurulumu kaldır. %1</translation>
</message>
</context>
<context>
<name>DeveloperPanel</name>
<message>
<source>Joystick Debug Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Longitudinal Maneuver Mode</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DevicePanel</name>
<message>
Expand Down Expand Up @@ -596,6 +607,10 @@ This may take up to a minute.</source>
<source>Software</source>
<translation>Yazılım</translation>
</message>
<message>
<source>Developer</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Setup</name>
Expand Down
Loading

0 comments on commit 3e0bab1

Please sign in to comment.