Commit Graph

182 Commits

Author SHA1 Message Date
DevTekVE
5b1bfc26db ui: add sunnylink settings and sidebar status (#503)
* Add Sunnylink integration for improved device communication

This commit introduces Sunnylink support, including modules for API interactions, device registration, logging, and uploader processes. Key changes involve adding Sunnylink-related components, such as sunnylinkd, manage_sunnylinkd, and associated utilities, along with seamless integration into process management.

* Refactor Sunnylink modules and update import paths

Standardize parameter handling in Sunnylink functions by initializing Params within functions as needed. Update imports to use fully-qualified paths for better clarity and consistency. Also, refactor logging messages for improved readability and maintainability.

* Add Sunnylink support and improve log handling

Introduced Sunnylink-specific functionality, including compression for oversized logs and platform-specific socket handling for macOS. Improved logging mechanisms, refactored log queue management, and fixed exception handling in sunnylinkd.

* Refactor and fix minor coding style inconsistencies

Remove unnecessary string concatenation, adjust spacing for better readability, and ensure cleaner code in `athenad.py` and `sunnylink.py`. Added a macOS-specific comment for TCP_KEEPALIVE configuration to improve code clarity.

* Replace platform system check with sys platform in athenad.py

To check for macOS platform, the code in athenad.py has been altered. Originally, the platform.system() function was used. However, the function has been replaced with sys.platform for a more consistent and preferable syntax. Particularly, this has been modified in the context of setting socket options.

* Apply suggestions from code review

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>

* Simplify imports and reformat API function.

Removed unused `platform` import for cleanup in `athenad.py`. Improved readability of `api_get` in `__init__.py` by reformatting the long return statement into multiple lines.

* Adjust backoff logic and refactor API call formatting.

Introduce randomness to backoff calculation in Sunnylink API to reduce synchronization issues. Minor code refactoring improves readability in the API call logic.

* Refactor Sunnylink network check logic.

Removed hardware-based network check due to performance concerns and replaced it with a real-time device state monitoring loop. This improves efficiency and ensures accurate online status before proceeding with Sunnylink registration.

* Apply suggestions from code review

* `Refactor saveParams error handling and simplify logic`

Removed redundant try-except block wrapping the entire method for clarity. Moved error logging directly inside the loop to handle individual parameter exceptions more effectively. Simplified dictionary construction and improved error logging format.

* Add BACKUP flag to select persistent parameters

This commit introduces a new BACKUP flag and applies it to specific persistent parameters in `params.cc` and `params.h`. The BACKUP flag enhances data retention by designating parameters for inclusion in backups, ensuring crucial information is preserved across sessions.

* Simplify Sunnypilot params formatting

Removed unnecessary blank lines and adjusted the Sunnypilot comment format for better readability and consistency. No functional changes were made.

* SP: Move Sunnypilot-related code to sunnypilot/sunnylink (#504)

* Refactor and relocate sunnylink-related modules

sunnylink components have been reorganized for better modularity and clarity, with files moved under `sunnypilot/sunnylink`. Unused code was removed, and reusable utilities were separated for easier maintenance. Adjusted references across the project to reflect these changes.

* Permissions

* adding init py

* Add sunnylink toggle to developer panel and translations

This commit introduces a new toggle for enabling or disabling sunnylink in the developer panel. Corresponding translation entries have been added for all supported languages to ensure compatibility across the UI.

* Add SunnyLink integration and multi-language support updates

Enhanced SidebarSP with SunnyLink connection status and temperature display. Extended translations for multiple languages, including new strings. Updated build scripts and added utility functions for SunnyPilot-specific features.

* Need it this way as it's intentionally shortened. Sorry

* format

* only block drawing

* format

* format

* fix path

* cleanup translations

* sunnylink panel

* offroad transition

* remove stretch

* add panel to ui preview

* Translating to spanish

* just reorder params

* Refactor sidebar drawing method names and remove unused code.

Renamed `paintSidebar` to `drawSidebar` for better clarity across both `Sidebar` and `SidebarSP` classes. Removed unused utility functions `drawRoundedRect` and `interpColor` to streamline the codebase and improve maintainability.

* Updating translations

---------

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-01-05 10:47:28 +01:00
Jason Wen
3966599e9d ui: sunnypilot offroad UI (#512)
* Revert "Revert "ui: sunnypilot offroad UI" (#511)"

This reverts commit 0e264e1b05.

* Revert "move files to sp dir"

This reverts commit c72d732259.

* remove drive stats for now

* update translation

* update onboarding

* remove sp onboarding for now

* rearrange

* remove more

* shorter license
2025-01-03 15:04:09 -05:00
Jason Wen
0e264e1b05 Revert "ui: sunnypilot offroad UI" (#511)
Revert "ui: sunnypilot offroad UI (#500)"

This reverts commit 3717a111af.
2025-01-03 11:02:19 -05:00
Jason Wen
3717a111af ui: sunnypilot offroad UI (#500)
* add sp flag

* return if sp macro

* controls

* drive stats

* some more

* more

* skip the whole thing

* missed

* more

* more main

* not ready to push yet but sure

* get them icons

* later

* own icons

* Revert "own icons"

This reverts commit e07bd8e670.

* blank icon

* render differently on mac

* static

* set toggle and title space properly

* format

* remove prior objects

* good spacing for ButtonParamControlSP

* more space formatting

* on device fix

* update home wifi prompt

* handle AbstractControlSP_SELECTOR hide events properly

* use sp

* ignore name

* more

* keep spacing

* better flag

* settings button moved

* small cleanup

* move files to sp dir

* remove for now

* developer different icon

* add scrolling to ui test

* Revert "add scrolling to ui test"

This reverts commit c8d1c65d89.

* format

* make them virtual

* do we still need this?

* Apply suggestions from code review

Co-authored-by: DevTekVE <devtekve@gmail.com>

* revert for now

* shorter license

---------

Co-authored-by: DevTekVE <devtekve@gmail.com>
2025-01-03 09:36:36 -05:00
Jason Wen
35278ba63b ui: Allow Qt spinner/text/setup/reset/updater to build on macOS (#34265)
ui: Allow spinner/text/setup/reset/updater to build on macOS
2024-12-16 16:25:46 -08:00
Adeeb Shihadeh
4226ef5a66 Setup system/ui/ move (#34124) 2024-11-28 11:48:48 -08:00
Maxime Desroches
4d08e114d9 installer: switch openpilot-internal to nightly-dev (#33938)
internal
2024-11-05 17:10:08 -08:00
Dean Lee
4f5ec14cf7 ui: refactor spinner using raylib (#33738)
* raylib spinner

* fix build issue on device

* keep qt spinner

* own SConscript
2024-11-04 09:07:07 -08:00
Alexandre Nobuharu Sato
72a88c9319 Add Developer Panel in Settings (#33828)
* hello world

* hello btn

* add ssh toggles

* split out developer panel code

* test this

* fix

* add ZMQ button

* add developer panel case to bot autogen screenshots

* give up bridge

* fix CI (generate screenshots)

* change from btn to toggles and interlock protection

* duplicated

---------

Co-authored-by: Comma Device <device@comma.ai>
2024-10-25 17:37:15 -07:00
Dean Lee
6baa541501 ui: refactor model updating and rendering into ModelRenderer class (#33702)
refactor model update

Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>
2024-10-03 10:46:05 -07:00
Dean Lee
caa33c3193 ui: refactor hud updating and rendering into HudRenderer class (#33458)
refactor hud updating and rendering into DriverMonitorRenderer class
2024-09-23 13:48:24 -07:00
Dean Lee
343de54030 ui: consolidate prime state management into PrimeState Class (#33473)
new class PrimeState
2024-09-09 14:34:11 -07:00
Dean Lee
43025c2836 ui: refactor driver monitor updating and rendering into DriverMonitorRenderer class (#33375)
* Refactor Driver Monitor Updating and Rendering

add comments

* rebase master

* rename dmon to driver_monitoring
old-commit-hash: af80a13716f2ba40b6652ab188d1881385b6aa71
2024-09-01 12:11:16 -07:00
Adeeb Shihadeh
5144cb0538 ui: gc experiments
old-commit-hash: 42f8875901
2024-08-31 17:24:50 -07:00
Dean Lee
c51889b05e ui: remove deprecated Qt ui_snapshot (#33402)
remove ui_snapshot
old-commit-hash: ac5cd06a3a
2024-08-29 12:24:21 -07:00
Adeeb Shihadeh
841768e768 ui: move more builds behind --minimal (#33368)
old-commit-hash: 5cb7aed8ce
2024-08-23 18:14:43 -07:00
Dean Lee
965aea8eab scons: remove duplicate linker flags for -ljson11, -lzmq (#33361)
fix duplicate link
old-commit-hash: 908aa525ec
2024-08-23 10:42:57 -07:00
Shane Smiskol
be710ab893 ensure alerts_generated.h is built (#33157)
don't build alerts_generated.h in test, and ensure scons builds it more reliably + clean up support
old-commit-hash: 7de618a5cf
2024-07-31 16:12:37 -07:00
Maxime Desroches
83d6af5162 ci: bring back aarch64 (#33017)
* casadi wheel

* ci

* test 312

* test with new aarch64 build

* use release wheels

* assert

* bool

* try this

* maybe

* work

* use final wheel
old-commit-hash: dcdac84f0c
2024-07-22 11:45:39 -07:00
Dean Lee
f0fdff113d ui/installer: hardcode SSH Keys in installer.cc (#32838)
hardcode keys
old-commit-hash: 4c04ae9a59
2024-06-26 11:52:11 -07:00
Adeeb Shihadeh
3b8ed67aa3 remove navigation (#32773)
* remove navigation

* lil more

* fix cabana

* revert for now

* fix docs

* move that over

* lock

* rm assets
old-commit-hash: e491c9d964
2024-06-19 19:14:13 -07:00
Maxime Desroches
1b836bdb86 Ubuntu 24.04 (#32624)
* noble build

* workflow

* symlink

* map only for noble

* sym

* add qt to cppcheck

* cppcheck noreturn in non void funct

* get kaitai header

* kaitai header

* syntax

* try new pyopencl

* try this version

* install lsb-core manually

* support old 20.04 lsb-core

* try arm

* try latest pyopencl

* revert

* use pocl icd

* no lock

* no arm pyopencl

* new intel opencl runtime

* pin filelock

* undo

* glsl version

* new version

* build test

* remove test

* new metadrive

* remove glsl restrictions

* <optional>

* Update .github/workflows/tools_tests.yaml

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* cache

* new cache

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 5c4ea14a3c
2024-06-18 03:30:32 +00:00
Harald Schäfer
7e4edcc8d5 MSGQ refactor: cleanup outstanding issues (#32685)
* Rm sim dockerfile from bad merge

* Add watch back

* Fix watch3 compilation
old-commit-hash: 1b2bd205b8
2024-06-10 13:18:47 -07:00
Harald Schäfer
05ed3d8c15 Restructure msgq (#32652)
* Update ref

* Compiles

* compiles

* Refactor rest of libs

* import all

* small fiex

* cleanup import

* Need msgq simlink too

* Add to openpilot docker too

* try repo

* Updates

* Fix lint

* fix docs

* Try blank slate

* Revert "Try blank slate"

This reverts commit f078ce04acacfe115c19e23e86038b01e2b84a6d.

* Maybe scons needs this to clear cache

* fix tests

* Disable test for now

* Update SConstruct

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* Fix whitespace

* Write skip normal

* small fixes

* add test path

* Revert repo

* linting

* whitespace

* Bump msgq

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: e70dc90a45
2024-06-09 17:44:34 -07:00
Harald Schäfer
f870a968e9 Split cereal into cereal/msgq (#32631)
* squash

* fix doc

* compile device

* compile device

* Update ref

* add msgq to precommit exclusions

* No service ports

* fix compile

* address comments

* More comments

* Delete logger

* Update opendbc

* Linting

* bump msgq
old-commit-hash: e71ec4e8d7
2024-06-06 14:31:56 -07:00
Dean Lee
b6c6c978a6 ui/onroad: split into multiple files (#32059)
old-commit-hash: c1b059de1e
2024-04-15 09:33:28 -07:00
Adeeb Shihadeh
22e8a76cd9 fix spinner asset paths (#31524)
old-commit-hash: 27c56722cc
2024-02-20 18:01:28 -08:00
Adeeb Shihadeh
ba78f80850 bring this back
old-commit-hash: 714e02d0bd
2024-02-09 12:46:06 -08:00
Hoang Bui
4c05358aad map: Transfer to MapLibre (#31185)
* change codebase

* compile

* add mapboxprovider

* works with map_renderer in c

* remove maplibre temp

* maplibre works

* cleanup build.sh

* x86 stuff

* add lib

* update release files

* don't need that

* tici build

* tici build

* add tici lib

* update refs

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 08037594e2
2024-02-01 13:37:22 -08:00
Adeeb Shihadeh
12d2d861f2 Revert "Switch from json11 to nlohmann/json (#31093)"
This reverts commit 8fa1e8aa53defca264272a66531d639b3d569418.

old-commit-hash: 88757c12b3
2024-01-22 22:41:59 -08:00
mtribiere
cb3a834067 Switch from json11 to nlohmann/json (#31093)
* Initial commit

* fix release/file_common

* Update common/swaglog.cc

* Swtiched serialize cc

* move to lfs

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: ee036482b8
2024-01-22 22:35:47 -08:00
Adeeb Shihadeh
972650f0eb remove dashcam branch (#31081)
* remove dashcam branch

* fix

* more cleanup

* remove param

* one more
old-commit-hash: 7cd9568423
2024-01-19 14:05:03 -08:00
Andrei Radulescu
1498eaf7c6 Support for newer versions of Qt (#31072)
* Dynamic QtGui version

* Fixed use of undeclared identifier 'va_start'

* Fix for Qt deprecations

* Fix for dynamic QtGui version

* Update selfdrive/ui/SConscript

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 28028aef17
2024-01-19 13:28:29 -08:00
Adeeb Shihadeh
c3567151f0 bump up installer size (#30722)
old-commit-hash: 2b12a499f7
2023-12-13 21:18:20 -08:00
Adeeb Shihadeh
2526dcf30c remove Qt wrapper scripts (#30454)
* remove Qt wrapper scripts

* revert those
old-commit-hash: 3831bf19e4
2023-12-10 11:45:35 -08:00
Justin Newberry
817161f3ac Soundd: move to python (#30567)
soundd python
old-commit-hash: abe39e5076
2023-12-05 18:10:01 -08:00
Adeeb Shihadeh
8b0d04faa9 remove mui
old-commit-hash: b3c7a0c871
2023-11-14 15:43:57 -08:00
Adeeb Shihadeh
dd9b72292e UI: remove drive stats (#30183)
* UI: remove drive stats

* little more

* vanish
old-commit-hash: f80db10720
2023-10-05 14:53:49 -07:00
Dean Lee
875b160fc6 ui/network: move to selfdrive/ui/qt/network/ (#29656)
* move to ui/qt/network

* wifimanager->wifi_manager
old-commit-hash: 125bd2cd9e
2023-08-27 15:23:19 -07:00
Dean Lee
65c5464138 ui: add translation files to assets.qrc (#29597)
* move translation files to assets.qrc

* cleanup

* add main_en

* dynamically add

* not sure if required

* revert to master

* move translations above assets

* add translations to qrc file

* comment

* now add translations_assets_src to assets sources

* this is built

* add to .gitignore

* consistent name

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: 17bfff8e10
2023-08-25 19:05:35 -07:00
Shane Smiskol
2b99c72dc2 ui: rebuild translations when widgets are modified (#29640)
fix translations not being updated for widgets
old-commit-hash: 2b4255b19e
2023-08-25 17:25:38 -07:00
Adeeb Shihadeh
61cf541322 Minimal build (#29600)
* add build flag for minimum build

* add minimal build

* update

* fix pj

* bump opendbc

* update subaru
old-commit-hash: 4917e22615
2023-08-24 14:58:30 -07:00
Kacper Rączy
edc31db6df aarch64: ubuntu build support (#29171)
* Add support for aarch64 pc linux

* Add new libyuv path to release files

* Add libyuv's x86_64 lib dir

* Move left-over platform specific dirs from files_common

* Remove libyuv/lib directory (duplicate)

* Fix mpc Sconscripts

* Remove acados lib path from mpc sources

* Fix typo

* Add watch3 exec on aarch64
old-commit-hash: c640429406
2023-08-01 16:18:46 -07:00
Dean Lee
7d5d1b1e70 ui/map: move MapInstructions & MapETA to separate files (#28976)
old-commit-hash: 942a2f9760
2023-07-20 21:58:46 +01:00
Adeeb Shihadeh
98972afe8a installer: openpilot-nightly installs nightly (#28997)
old-commit-hash: 2d6ff7b7b1
2023-07-17 17:01:41 -07:00
Cameron Clough
b6e6f008f1 UI: improved nav destination entry (#28476)
old-commit-hash: bc5a899024
2023-06-22 19:57:29 +01:00
Cameron Clough
adb8a80ff4 UI: connect to wifi prompt (#28273)
* OffroadHome: move experimental mode button to right column

* OffroadHome: replace DriveStats with PrimeAd when no prime

* SetupWidget: remove PrimeAd

* SetupWidget: tweaks to fit smaller space

* UI: add WiFiPromptWidget

* WiFiPrompt: update using network type

* add WiFiPromptWidget to offroad home

* reduce spacing to fit vertical space

* WiFiPromptWidget: open Wi-Fi settings

* no longer necessary

* cleanup

* shrink PrimeUser widget and increase Setup Wi-Fi font size

* correctly resize widget when stack index changes

* layout tweaks

* debug

* spacing

* slightly improved style

* helps -> help

* .
old-commit-hash: 4f815db141
2023-06-02 23:24:38 -07:00
Cameron Clough
11889dd024 UI snapshot tool (#28356)
* UI: snapshot testing tool

* gitignore

* cleanup

* remove prime type arg

* rename

* add script

* commit snapshots

* use base setup

* updates

* always run base

* echo

* use imagemagick

* test_snapshots

* fixes

* update

* set language

* revert

* default arg

* just remove translations

* formatting

* output arg

* improved help

* fix assets

* change dir back before saving snapshot

* unused imports

* simpler

* add default to description

* use uiUpdate signal
old-commit-hash: 15ac8c041b
2023-05-31 23:04:30 -07:00
Dean Lee
7cd3e178c1 cabana: add qrc resource file (#27386)
* add qrc resource file

* remove export
old-commit-hash: 8e3cb0fb20
2023-02-19 15:14:13 -08:00
Adeeb Shihadeh
6ab6b643a8 set path for extra qt bins on device (#27022)
* set path for extra qt bins on device

* no print

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: e883976a32
2023-01-20 14:11:43 -08:00