Commit Graph

10017 Commits

Author SHA1 Message Date
DevTekVE 5bcd0a2d3d Refactor onboarding process and terms page in Sunnypilot
The code modifications refactor the onboarding window and terms page in Sunnypilot. It includes moving OnboardingWindow to the protective area, and changing OnboardingWindowSP into a subclass of OnboardingWindow, which enhances code encapsulation and reusability. The expressions for the terms agreement pages are also refined for better readability.

initial onboarding
2024-07-23 11:40:10 +02:00
DevTekVE 47420fda5d Improve HttpRequest class for QT and refactor associated classes
The presented change refactors the HttpRequest class in the QT API for the OpenPilot project. Unused OpenSSL libraries were removed, and the HttpRequest class was modified to improve readability. The HttpRequest::sendRequest method was refactored, and the logic to prepare the network request was extracted to a new method called HttpRequest::prepareRequest. In addition, the user agent retrieval logic was encapsulated within the HttpRequest class.

The RequestRepeater class was similarly refactored. Timer connection and cache processing logic were moved into separate methods for better code organization.

Several other classes that depend on HttpRequest and RequestRepeater were modified to reflect these changes. Handled security-related changes for SunnyPilot. Added a new file `sp_priv_api.cc` for Sunnylink-specific API operations. Removed unnecessary includes and updated SConscript accordingly.
2024-07-23 11:40:09 +02:00
DevTekVE cc43701808 Refactor code related to Sunnypilot's special utilities
This commit updates various scripts involved in Sunnypilot's special utilities. Modifications primarily include simplification of several functions in 'util.cc', addition of required exports in 'SConscript', and restructuring `getUserAgent`, `getDongleId`, and `getCarNames` methods under `sp_priv_util.h` and `sp_priv_util.cc`. The changes help segregate Sunnypilot specific utility functions, resulting in cleaner and more maintainable code.
2024-07-23 11:40:09 +02:00
DevTekVE 99b0276913 Add conditional compilation for 'sunnypilot' in SConscript
This commit introduces a conditional compilation for 'sunnypilot' within the SConscript file. It also adds a new 'sp_priv_text.cc' file for 'sunnypilot' and performs a significant cleanup on the existing 'text.cc' file, removing unneeded commands. This change helps to customize the build process based on the specific feature flags such as 'sunnypilot'.
2024-07-23 11:40:09 +02:00
DevTekVE 8e5e4a611f Update mousePressEvent behavior in HomeWindowSP
This update stops calling the parent mousePressEvent function in HomeWindowSP due to conflicts with sidebar code. Previous implementation led to undesired sidebar behaviour following a tap beyond the 300px of the left. Added debug logging to provide more context on the behavior of sidebar and screen wake timeout.
2024-07-22 10:22:39 +02:00
DevTekVE d164bf2f02 Fixed bug where the toggles were on the parent's instance as opposed to the derived class instance and fixed the index as well 2024-07-21 16:10:54 +02:00
DevTekVE 08abc5c9eb map stuff 2024-07-21 15:35:09 +02:00
DevTekVE 1edda9eadb Merge branch 'refs/heads/master-priv' into ui-sp-split
# Conflicts:
#	selfdrive/ui/sunnypilot/SConscript
2024-07-21 15:19:40 +02:00
DevTekVE 8865950499 Update definitions for compatibility in SunnyPilot UI
The commit introduces several definitions under the SUNNYPILOT flag in different files for compatibility. These changes are meant to make sure controls previously relying on other labels now properly use specifically defined SunnyPilot labels. The update reduces confusion and enhances code clarity.
2024-07-21 15:16:31 +02:00
DevTekVE b7b813c531 Update UI components with new SP controls
Replaced several different ButtonControl, ToggleControl, and LabelControl instances with their corresponding SP versions across various sections of the UI. This improves the consistency of the user interface and lays the groundwork for further enhancements.
2024-07-21 15:04:53 +02:00
DevTekVE 69a2408c44 Update self-driving UI for SunnyPilot behavior
Modified the self-driving UI components to better accommodate SunnyPilot's custom behavior. Changes include the reduction of EXTRA_UI_STATES, addition of early returns in updates if in SunnyPilot mode, and revisions in UIStateSP update methods. The refactoring also includes rearrangement of car status updates and removal of duplicate parameters acquisition.
2024-07-21 13:44:48 +02:00
DevTekVE fa668e786c Implemented a window update for SunnyPilot mode
The code was tailored to work with SunnyPilot mode. It includes various changes, such as adding logic to the main window to include SunnyPilot's window when it's active and making changes to the MainWindow constructor for compatibility with SunnyPilot. Additional changes were made to various UI elements to ensure compatibility with the different mode. This update provides a more seamless user experience when switching between the two modes, SunnyPilot and standard.
2024-07-21 12:42:51 +02:00
Jason Wen 8b6e403996 Driving Model Selector v5: Bug fixes 2024-07-20 13:06:34 +00:00
DevTekVE 8735a0a776 Refactor MainWindow and add support for SunnyPilot
The MainWindow constructor now accepts optional parameters to allow for more flexibility in window management. This enabled us to add support for a variant of the UI called SunnyPilot. Separate header and source files `sp_priv_window.h` and `sp_priv_window.cc` have been created for this variant, which has its own logic but inherits from the same MainWindow class.
2024-07-20 11:57:56 +02:00
Jason Wen ee229c2b70 maps: Use UIStateSP and disconnect 2024-07-19 15:52:19 -04:00
DevTekVE 62e8791b1e Update UIState references in Sunnypilot code
Updated to use new UIStateSP class in Sunnypilot's map and onroad functionality. The previous UIState class has been replaced, to fall in line with other changes in the Sunnypilot system, adapting the function arguments and variable assignments accordingly.
2024-07-19 18:51:42 +02:00
DevTekVE fcd0dc2874 Refactor and enhance UI state and device classes for both base and sunny pilot
Various improvements have been made to UI state and device classes in both base and sunny pilot. This includes better organization of code, addition of new functionalities and removal of unused code and libraries.

Each UI state update now also updates the sockets and the state itself. Conditions for brightness updates in deviceSP's methods are also simplified. This results in a more streamlined update process.

Changes have been made to update the device brightness according to the specified parameters. If the screen is expected to be off, the brightness is set to 0. Otherwise, the brightness is set to a level according to the onroadScreenOffBrightness parameter.

The rest of the changes involve cleaning up redundant code, updating includes, and removing unnecessary typecasts and conversions. The parameters updating are now handled more succinctly.

Overall, the updated code provides a cleaner, more efficient implementation of the UI and devices.
2024-07-19 18:28:05 +02:00
Jaosn Wen 522d42500e maps: split 2024-07-18 11:17:07 -04:00
Jaosn Wen eb0ced8040 ui: header imports 2024-07-17 23:07:32 -04:00
Jaosn Wen f6ee3d69f4 ui.h rename (WIP) 2024-07-17 22:53:42 -04:00
Jaosn Wen fd64c79d35 ui.cc|h: init 2024-07-17 22:48:54 -04:00
Jaosn Wen b12e82adc7 controls: Keep stock as stock as possible 2024-07-17 20:39:00 -04:00
Jaosn Wen e07dd2fd9c ReplaceWidget: more safety 2024-07-17 20:23:36 -04:00
Jaosn Wen 124a230296 AbstractControlSP: Inherit from stock AbstractControl 2024-07-17 20:23:24 -04:00
Jaosn Wen 093980b767 SP Controls: Icons not needed for ButtonParamControlSP 2024-07-17 18:52:00 -04:00
Jaosn Wen fa71f0667c cleanup 2024-07-17 00:59:32 -04:00
Jaosn Wen ad01e930c6 widgets: rename 2024-07-17 00:56:17 -04:00
Jaosn Wen d111bff3cf onroad settings: rename 2024-07-17 00:54:21 -04:00
Jaosn Wen 4be255ab61 onroad settings: rename 2024-07-17 00:51:48 -04:00
Jaosn Wen 6e962afe1a settings: more renaming 2024-07-17 00:46:55 -04:00
Jaosn Wen 1fd5140d29 settings: Rename 2024-07-17 00:22:11 -04:00
Jaosn Wen a4b57f4178 sunnypilot_main 2024-07-16 23:32:25 -04:00
Jaosn Wen c0b732081b sunnypilot: Rename all sub panels 2024-07-16 23:22:04 -04:00
DevTekVE a4926ef332 Rename and remove custom abstracts for map support
Refactor class names by renaming AbstractControl to AbstractControlSP_TITLED and LayoutWidget to LayoutWidgetSP. Removed conditional compilation definitions for map support to streamline the code and avoid multiple definition errors.
2024-07-16 23:14:57 +02:00
Jaosn Wen 12151efa78 MadsSettings: rename 2024-07-16 16:01:13 -04:00
Jaosn Wen 9377e9a56c LaneChangeSettings: rename 2024-07-16 15:53:34 -04:00
Jaosn Wen c001c1e93c CustomOffsetsSettings: rename 2024-07-16 15:39:01 -04:00
Jaosn Wen 1b291893bb qt/network/sunnylink: rename 2024-07-16 15:05:01 -04:00
Jaosn Wen 0ca98a8379 Scons: Split sunnypilot/Sconscript 2024-07-16 00:20:45 -04:00
Jaosn Wen a9bcc782e0 Scons: Set SUNNYPILOT to CPPDEFINES 2024-07-16 00:07:29 -04:00
Jaosn Wen dbaa14dec1 revert translations 2024-07-15 23:40:54 -04:00
Jason Wen 62cc0fa0d2 Scons: Build sunnypilot elements with added GPG keys 2024-07-16 02:59:02 +00:00
Jaosn Wen 3507e627ac Revert "ui.cc|h: split completely (refactor later) (WIP)"
This reverts commit c4abe230a7.
2024-07-14 23:03:20 -04:00
Jaosn Wen 7a2778f3f1 Reapply "Only when building map"
This reverts commit ec0c2edd66.
2024-07-14 23:01:45 -04:00
Jaosn Wen 1386d1215b Reapply "SP Controls: Fix duplicate classes"
This reverts commit 142db222ce.
2024-07-14 23:01:44 -04:00
Jaosn Wen 134f585482 Revert "Remove stock classes from compiling"
This reverts commit 4e1ef0dca7.
2024-07-14 23:01:44 -04:00
Jaosn Wen 4e1ef0dca7 Remove stock classes from compiling 2024-07-14 22:38:27 -04:00
Jaosn Wen 142db222ce Revert "SP Controls: Fix duplicate classes"
This reverts commit 02b3ea4917.
2024-07-14 22:35:37 -04:00
Jaosn Wen ec0c2edd66 Revert "Only when building map"
This reverts commit 5c1c833223.
2024-07-14 22:35:37 -04:00
Jaosn Wen c4abe230a7 ui.cc|h: split completely (refactor later) (WIP) 2024-07-14 22:35:19 -04:00