From f50d7a1842bf93f4f5b6ff08707089046d4061ca Mon Sep 17 00:00:00 2001 From: Jason Wen Date: Sun, 16 Mar 2025 02:34:25 -0400 Subject: [PATCH 1/4] ui: Update FirehosePanel with sunnypilot ui updates (#666) --- selfdrive/ui/qt/offroad/firehose.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/selfdrive/ui/qt/offroad/firehose.cc b/selfdrive/ui/qt/offroad/firehose.cc index fd173a1c7a..e6a9c5c6e9 100644 --- a/selfdrive/ui/qt/offroad/firehose.cc +++ b/selfdrive/ui/qt/offroad/firehose.cc @@ -12,6 +12,10 @@ #include #include +#ifdef SUNNYPILOT +#define UIState UIStateSP +#endif + FirehosePanel::FirehosePanel(SettingsWindow *parent) : QWidget((QWidget*)parent) { layout = new QVBoxLayout(this); layout->setContentsMargins(40, 40, 40, 40); From 4fbf7a81b43a2030355f4194fe8374857a0eb350 Mon Sep 17 00:00:00 2001 From: DevTekVE Date: Sun, 16 Mar 2025 16:12:43 +0100 Subject: [PATCH 2/4] sunnylink: Fix IMEI fetching during registration (#661) Fix getting the imei for the registration --- sunnypilot/sunnylink/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sunnypilot/sunnylink/api.py b/sunnypilot/sunnylink/api.py index 4abefa12f8..9f82fd2d20 100644 --- a/sunnypilot/sunnylink/api.py +++ b/sunnypilot/sunnylink/api.py @@ -55,7 +55,7 @@ class SunnylinkApi(BaseApi): imei_try = 0 while imei1 is None and imei2 is None and imei_try < MAX_RETRIES: try: - imei1, imei2 = self.params.get("IMEI", encoding='utf8') or HARDWARE.get_imei(0), HARDWARE.get_imei(1) + imei1, imei2 = HARDWARE.get_imei(0), HARDWARE.get_imei(1) except Exception: self._status_update(f"Error getting imei, trying again... [{imei_try + 1}/{MAX_RETRIES}]") time.sleep(1) From 61b9d81ba6aa6dd3ad1c8620939957fe2d252644 Mon Sep 17 00:00:00 2001 From: DevTekVE Date: Sun, 16 Mar 2025 17:08:21 +0100 Subject: [PATCH 3/4] CI: identify new screenshots in UI preview (#668) Added checks for new UI files in PRs The git workflow script `ui_preview.yaml` has been modified. The script now checks if the master branch contains a file corresponding to a UI file present in the PR. If a UI file in the PR does not have a match on the master branch, it is marked as new. These enhancements improve the comparison of UI changes between the master and PR branches, particularly with the identification of new UI files. --- .github/workflows/ui_preview.yaml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ui_preview.yaml b/.github/workflows/ui_preview.yaml index 2ded4a2d2a..28198d7dbb 100644 --- a/.github/workflows/ui_preview.yaml +++ b/.github/workflows/ui_preview.yaml @@ -95,8 +95,21 @@ jobs: for ((i=0; i<${#A[*]}; i=i+1)); do + # Check if the master file exists + if [ ! -f "${{ github.workspace }}/master_ui/${A[$i]}.png" ]; then + # This is a new file in PR UI that doesn't exist in master + DIFF="${DIFF}
" + DIFF="${DIFF}${A[$i]} : \$\${\\color{blue}\\text{NEW}}\$\$" + DIFF="${DIFF}" - if ! compare -fuzz 2% -highlight-color DeepSkyBlue1 -lowlight-color Black -compose Src ${{ github.workspace }}/master_ui/${A[$i]}.png ${{ github.workspace }}/pr_ui/${A[$i]}.png ${{ github.workspace }}/pr_ui/${A[$i]}_diff.png; then + DIFF="${DIFF}" + DIFF="${DIFF} " + DIFF="${DIFF} " + DIFF="${DIFF}" + + DIFF="${DIFF}
master proposed
" + DIFF="${DIFF}
" + elif ! compare -fuzz 2% -highlight-color DeepSkyBlue1 -lowlight-color Black -compose Src ${{ github.workspace }}/master_ui/${A[$i]}.png ${{ github.workspace }}/pr_ui/${A[$i]}.png ${{ github.workspace }}/pr_ui/${A[$i]}_diff.png; then convert ${{ github.workspace }}/pr_ui/${A[$i]}_diff.png -transparent black mask.png composite mask.png ${{ github.workspace }}/master_ui/${A[$i]}.png composite_diff.png convert -delay 100 ${{ github.workspace }}/master_ui/${A[$i]}.png composite_diff.png -loop 0 ${{ github.workspace }}/pr_ui/${A[$i]}_diff.gif From 89e385b692bb09b1cefd8ee3df4a4be82d0fcc9b Mon Sep 17 00:00:00 2001 From: DevTekVE Date: Sun, 16 Mar 2025 18:01:31 +0100 Subject: [PATCH 4/4] CI: update default screenshot in UI preview (#669) Jason Jason... --- .github/workflows/ui_preview.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ui_preview.yaml b/.github/workflows/ui_preview.yaml index 28198d7dbb..9963f2958c 100644 --- a/.github/workflows/ui_preview.yaml +++ b/.github/workflows/ui_preview.yaml @@ -99,11 +99,11 @@ jobs: if [ ! -f "${{ github.workspace }}/master_ui/${A[$i]}.png" ]; then # This is a new file in PR UI that doesn't exist in master DIFF="${DIFF}
" - DIFF="${DIFF}${A[$i]} : \$\${\\color{blue}\\text{NEW}}\$\$" + DIFF="${DIFF}${A[$i]} : \$\${\\color{cyan}\\text{NEW}}\$\$" DIFF="${DIFF}" DIFF="${DIFF}" - DIFF="${DIFF} " + DIFF="${DIFF} " DIFF="${DIFF} " DIFF="${DIFF}"
master master proposed