mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-06-08 11:25:51 +08:00
Compare commits
1 Commits
67e5bd3c1e
...
archive/re
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
656fe07718 |
2
.github/workflows/ui_preview.yaml
vendored
2
.github/workflows/ui_preview.yaml
vendored
@@ -86,7 +86,7 @@ jobs:
|
||||
run: >-
|
||||
sudo apt-get install -y imagemagick
|
||||
|
||||
scenes="homescreen settings_device settings_software settings_sunnylink settings_toggles settings_sunnypilot settings_sunnypilot_mads setup_settings_trips 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"
|
||||
scenes="homescreen settings_device settings_software settings_sunnylink settings_toggles settings_sunnypilot settings_sunnypilot_mads 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=""
|
||||
|
||||
@@ -20,7 +20,6 @@ qt_src = [
|
||||
"sunnypilot/qt/offroad/settings/software_panel.cc",
|
||||
"sunnypilot/qt/offroad/settings/sunnylink_panel.cc",
|
||||
"sunnypilot/qt/offroad/settings/sunnypilot_panel.cc",
|
||||
"sunnypilot/qt/offroad/settings/trips_panel.cc",
|
||||
"sunnypilot/qt/onroad/annotated_camera.cc",
|
||||
"sunnypilot/qt/onroad/hud.cc",
|
||||
"sunnypilot/qt/onroad/model.cc",
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
#include "selfdrive/ui/sunnypilot/qt/offroad/settings/software_panel.h"
|
||||
#include "selfdrive/ui/sunnypilot/qt/offroad/settings/sunnylink_panel.h"
|
||||
#include "selfdrive/ui/sunnypilot/qt/offroad/settings/sunnypilot_panel.h"
|
||||
#include "selfdrive/ui/sunnypilot/qt/offroad/settings/trips_panel.h"
|
||||
|
||||
TogglesPanelSP::TogglesPanelSP(SettingsWindow *parent) : TogglesPanel(parent) {
|
||||
QObject::connect(uiStateSP(), &UIStateSP::uiUpdate, this, &TogglesPanelSP::updateState);
|
||||
@@ -75,7 +74,6 @@ SettingsWindowSP::SettingsWindowSP(QWidget *parent) : SettingsWindow(parent) {
|
||||
PanelInfo(" " + tr("Toggles"), toggles, "../../sunnypilot/selfdrive/assets/offroad/icon_toggle.png"),
|
||||
PanelInfo(" " + tr("Software"), new SoftwarePanelSP(this), "../../sunnypilot/selfdrive/assets/offroad/icon_software.png"),
|
||||
PanelInfo(" " + tr("sunnypilot"), new SunnypilotPanel(this), "../assets/images/button_home.png"),
|
||||
PanelInfo(" " + tr("Trips"), new TripsPanel(this), "../../sunnypilot/selfdrive/assets/offroad/icon_trips.png"),
|
||||
PanelInfo(" " + tr("Developer"), new DeveloperPanel(this), "../assets/offroad/icon_shell.png"),
|
||||
};
|
||||
|
||||
|
||||
@@ -1,36 +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.
|
||||
*/
|
||||
|
||||
#include "selfdrive/ui/sunnypilot/qt/offroad/settings/trips_panel.h"
|
||||
|
||||
TripsPanel::TripsPanel(QWidget* parent) : QFrame(parent) {
|
||||
QVBoxLayout* main_layout = new QVBoxLayout(this);
|
||||
main_layout->setMargin(0);
|
||||
|
||||
// main content
|
||||
main_layout->addSpacing(25);
|
||||
center_layout = new QStackedLayout();
|
||||
|
||||
driveStatsWidget = new DriveStats;
|
||||
driveStatsWidget->setStyleSheet(R"(
|
||||
QLabel[type="title"] { font-size: 51px; font-weight: 500; }
|
||||
QLabel[type="number"] { font-size: 78px; font-weight: 500; }
|
||||
QLabel[type="unit"] { font-size: 51px; font-weight: 300; color: #A0A0A0; }
|
||||
)");
|
||||
center_layout->addWidget(driveStatsWidget);
|
||||
|
||||
main_layout->addLayout(center_layout, 1);
|
||||
|
||||
setStyleSheet(R"(
|
||||
* {
|
||||
color: white;
|
||||
}
|
||||
TripsPanel > QLabel {
|
||||
font-size: 55px;
|
||||
}
|
||||
)");
|
||||
}
|
||||
@@ -1,25 +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.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "selfdrive/ui/sunnypilot/qt/widgets/controls.h"
|
||||
|
||||
#include "selfdrive/ui/sunnypilot/qt/widgets/drive_stats.h"
|
||||
|
||||
class TripsPanel : public QFrame {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit TripsPanel(QWidget* parent = 0);
|
||||
|
||||
private:
|
||||
Params params;
|
||||
|
||||
QStackedLayout* center_layout;
|
||||
DriveStats *driveStatsWidget;
|
||||
};
|
||||
@@ -42,17 +42,16 @@ def setup_settings_device(click, pm: PubMaster, scroll=None):
|
||||
|
||||
def setup_settings_toggles(click, pm: PubMaster, scroll=None):
|
||||
setup_settings_device(click, pm)
|
||||
click(278, 632)
|
||||
click(278, 640)
|
||||
time.sleep(UI_DELAY)
|
||||
|
||||
def setup_settings_software(click, pm: PubMaster, scroll=None):
|
||||
setup_settings_device(click, pm)
|
||||
click(278, 742)
|
||||
click(278, 750)
|
||||
time.sleep(UI_DELAY)
|
||||
|
||||
def setup_settings_developer(click, pm: PubMaster, scroll=None):
|
||||
setup_settings_device(click, pm)
|
||||
scroll(-100, 278, 962)
|
||||
click(278, 970)
|
||||
time.sleep(UI_DELAY)
|
||||
|
||||
@@ -123,8 +122,7 @@ def setup_body(click, pm: PubMaster, scroll=None):
|
||||
|
||||
def setup_keyboard(click, pm: PubMaster, scroll=None):
|
||||
setup_settings_device(click, pm)
|
||||
scroll(-100, 278, 962)
|
||||
click(278, 970)
|
||||
click(250, 965)
|
||||
click(1930, 228)
|
||||
|
||||
def setup_driver_camera(click, pm: PubMaster, scroll=None):
|
||||
@@ -182,27 +180,22 @@ def setup_settings_sunnylink(click, pm: PubMaster, scroll=None):
|
||||
Params().put_bool("SunnylinkEnabled", True)
|
||||
|
||||
setup_settings_device(click, pm)
|
||||
click(278, 522)
|
||||
click(278, 530)
|
||||
time.sleep(UI_DELAY)
|
||||
|
||||
def setup_settings_sunnypilot(click, pm: PubMaster, scroll=None):
|
||||
setup_settings_device(click, pm)
|
||||
click(278, 852)
|
||||
click(278, 860)
|
||||
time.sleep(UI_DELAY)
|
||||
|
||||
def setup_settings_sunnypilot_mads(click, pm: PubMaster, scroll=None):
|
||||
Params().put_bool("Mads", True)
|
||||
|
||||
setup_settings_device(click, pm)
|
||||
click(278, 852)
|
||||
click(278, 860)
|
||||
click(970, 455)
|
||||
time.sleep(UI_DELAY)
|
||||
|
||||
def setup_settings_trips(click, pm: PubMaster, scroll=None):
|
||||
setup_settings_device(click, pm)
|
||||
click(278, 962)
|
||||
time.sleep(UI_DELAY)
|
||||
|
||||
CASES = {
|
||||
"homescreen": setup_homescreen,
|
||||
"prime": setup_homescreen,
|
||||
|
||||
@@ -756,10 +756,6 @@ This may take up to a minute.</source>
|
||||
<source>sunnylink</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Trips</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Setup</name>
|
||||
|
||||
@@ -738,10 +738,6 @@ This may take up to a minute.</source>
|
||||
<source>sunnylink</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Trips</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Setup</name>
|
||||
|
||||
@@ -740,10 +740,6 @@ Esto puede tardar un minuto.</translation>
|
||||
<source>sunnylink</source>
|
||||
<translation>sunnylink</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Trips</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Setup</name>
|
||||
|
||||
@@ -740,10 +740,6 @@ Cela peut prendre jusqu'à une minute.</translation>
|
||||
<source>sunnylink</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Trips</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Setup</name>
|
||||
|
||||
@@ -734,10 +734,6 @@ This may take up to a minute.</source>
|
||||
<source>sunnylink</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Trips</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Setup</name>
|
||||
|
||||
@@ -736,10 +736,6 @@ This may take up to a minute.</source>
|
||||
<source>sunnylink</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Trips</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Setup</name>
|
||||
|
||||
@@ -740,10 +740,6 @@ Isso pode levar até um minuto.</translation>
|
||||
<source>sunnylink</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Trips</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Setup</name>
|
||||
|
||||
@@ -736,10 +736,6 @@ This may take up to a minute.</source>
|
||||
<source>sunnylink</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Trips</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Setup</name>
|
||||
|
||||
@@ -734,10 +734,6 @@ This may take up to a minute.</source>
|
||||
<source>sunnylink</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Trips</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Setup</name>
|
||||
|
||||
@@ -736,10 +736,6 @@ This may take up to a minute.</source>
|
||||
<source>sunnylink</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Trips</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Setup</name>
|
||||
|
||||
@@ -736,10 +736,6 @@ This may take up to a minute.</source>
|
||||
<source>sunnylink</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Trips</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Setup</name>
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user