Commit Graph

14218 Commits

Author SHA1 Message Date
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
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 dbaa14dec1 revert translations 2024-07-15 23:40:54 -04:00
Jaosn Wen f04c019843 sync 2024-07-15 23:07:27 -04:00
Jaosn Wen f672244343 Merge branch 'master-priv' into ui-sp-split
# Conflicts:
#	selfdrive/ui/sunnypilot/SConscript
2024-07-15 22:59:33 -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
Jaosn Wen 7ddc18d08f DeveloperUi: Add comments 2024-07-14 22:01:37 -04:00
Jaosn Wen 7a58f3026d Dev UI: rename 2024-07-14 21:52:43 -04:00
Jaosn Wen 08449ddb77 DeveloperUi: Split 2024-07-14 21:44:05 -04:00
Jason Wen 5c1c833223 Only when building map 2024-07-14 19:07:11 -04:00
Jason Wen 02b3ea4917 SP Controls: Fix duplicate classes 2024-07-14 18:56:55 -04:00
Jason Wen f2c500249c Sidebar: missing import 2024-07-14 16:48:26 -04:00
DevTekVE e02c4a60f9 Rename instances of 'openpilot' to 'sunnypilot' in settings
Updated references in the settings UI to replace 'openpilot' with 'sunnypilot' for consistency with branding. This includes various descriptions and warnings related to longitudinal control and driver monitoring.
2024-07-14 22:40:06 +02:00
DevTekVE dc6c20ba97 Add separate Sidebar implementation for SunnyPilot
The file structure of SidebarSP has been revamped. A separate SidebarSP class has been created instead of overriding pieces of Sidebar. The implementation of SidebarSP has been encapsulated in the new SidebarSP class files (sp_priv_sidebar.cc and sp_priv_sidebar.h). The code integrity of Sidebar and its usages in offroad_home.h and sp_priv_home.h have been maintained. This should increase the overall modularity of the code.
2024-07-14 22:37:25 +02:00
DevTekVE 66be7afbdb Apply 3 suggestion(s) to 2 file(s) 2024-07-14 19:24:40 +00:00