* deprecated
* cruise main state
* v cruise non pcm state
* acc mads combo
* cancel cruise state
* sp common state
* sp event
* custom stock long
* started mads
* v cruise non pcm state old
* acc mads old
* started mads old
* Hyundai Longitudinal: Enable radar tracks based on availability
* don't loop
* just 2
* missed
* missed
* fix
* do this
* every time
* quicker
* less
* nope
* more
* cleanup
* Hyundai Longitudinal: Enable Cruise Main when started
* don't do this for the ancients (@devtekve 😉)
* okay, toggle per @devtekve xD
* update texts
* non pcm only
* translations
* Remove redundant git lfs pull command
The `git lfs pull` command in the GitHub workflow is redundant and has been removed. Additionally, the `sync-lfs.sh` script has been updated to push all LFS objects to the origin repository.
* using force push instead of trying to merge
* Bumping ssh agent to 0.9.0
* Syntax
---------
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
* fixing build number + forcing run to test
* Cleaning up and changing the process for the auto builds
* updating the logic for the extra verson identifier
* Return to default master-dev-c3
* if this is MR on gitlab, we also publish prebuilt on private gitlab for internal testing
* Silly formatting issue
* MADS: HKG CAN-FD: Disallow cruise buttons to engage when pcmCruiseSpeed is off
* handle states properly
* this is better
* make sure main button is pressed
* oops flipped main
* same behavior
* handle cruise main button universally
* both
* not needed
* oops
* wtf how did i miss
* car: Check params before car state is updated
* read params in a thread instead
* initialize list
* Do this instead
* type hint
* ParamManager
* make them internal
* MADS: Map cruise main and lateral buttons to button events
* MADS: Map cruise main and lateral buttons to button events
* different style
* nah
(cherry picked from commit 4d7afe3a7b)
* reimplement
* all
* right sz
* what is this
* Revert "what is this"
This reverts commit 3ff771926f109452a055dfb61cee06b34e498164.
* ok
* big
* update intrs
* fl
* more specifuc
* fish
* revert
* revert
---------
Co-authored-by: Comma Device <device@comma.ai>
Enable Sunnylink by default
Sunnylink was previously conditionally enabled based on build metadata. This change ensures that Sunnylink is enabled by default, facilitating immediate access for all builds.
* use new opendbc api
* export pandad_python
* merge master
* merge master
* bump opendbc
* bump opendbc
* improve func
* keep interface unchanged
* fix test_car_interfaces
* bump opendbc
* bump opendbc
* fix test_models
* the interface now has to convert from can capnp to list, so we should include this time
* goes from ~210 to ~240 mean ms real time
* remoe busTime
* lowercase sendcan
* consistent msgtype
* bump
* bump
* not used in lat_mpc
* space
* bump to master
---------
Co-authored-by: Shane Smiskol <shane@smiskol.com>
* Use livePose instead of llk
* Update process replay sockets
* Fix import
* Fix calib
* Fix field name
* Dont store device_from_calib
* Update ref commit
Remove redundant brightness calculation from DeviceSP by leveraging Device's implementation. Introduce a conditional return to handle Sunnypilot-specific logic cleanly.
Implemented an override for the updateBrightness function in DeviceSP. This ensures proper handling of UIState type by dynamically casting it to UIStateSP.
* use zstd in test_onroad
* debug
* now leans towards 0.4 instead of 0.5
* 5x runs
* better
* more
* Update selfdrive/test/test_onroad.py
* revert Jenkinsfile
* and this
* zstd uploader
* fix that
* fix name of function
* comment
* log failed
* fix comma_api_source for routes with both bz2 and zst rlogs
* TODO
* 10-14 achieves almost no benefit on qlogs in a few cases, but takes 2x the time
* these aren't written out
* regen: specify any list of sources
ooh this is pretty nice
* regen and process replay
* damn, actually we don't need all this (cool tho)
Revert "regen: specify any list of sources"
This reverts commit ceb0b4abed9ad463a9fe98d9b98a05875a52806f.
* just let it auto resolve
* fix athenad/uploader tests
* zst here too
* TODOs
* yes
* Revert "TODOs"
This reverts commit 8c7da1dbd0340c72290b5eb5563b642080ddc131.
* Revert "zst here too"
This reverts commit 23b0023ddfd22c8090be7a7caa09e7026a12aa5c.
* Revert "just let it auto resolve"
This reverts commit f296d62424227ad05facc62abc18a6f81b474e84.
* Revert "regen and process replay"
This reverts commit 0768330e96974a42616d229d159780619d049cd0.
* revert readme
* not in save_log either
* lfg
* Revert "lfg"
This reverts commit 3718559c6c4de7d1f0c80dc9f1a1d335fe679a89.
Refactor the way external scripts 'gitlab_runner.sh' and 'sunnylink_uploader.py' are included in the process list based on their existence. This improves code readability and ensures that the inclusion checks are performed at a single point.
Changed the build option flag from '--sunnypilot' to '--stock-ui' to improve clarity. Updated related conditions and defaults in 'selfdrive/ui/SConscript' and 'SConstruct' files for consistency. Removed unused internal developer check logic from 'SConstruct'.
Added a third chevron type to display Time-to-Collision (TTC) metrics for the lead car. Modified logic to handle the new metrics type, allowing for comprehensive data on distance, speed, and TTC. Adjusted text box dimensions as needed for the additional information.
This commit refactors the networking files and includes a SunnyPilot network UI. Changes in existing files result in the removal of some features not required for SunnyPilot while retaining others. For instance, the 'ToggleControl' functionality for Sunnypilot was removed as Sunnypilot does not require this feature. Other changes include adjustments to the network's user interface layout and the removal of unnecessary widgets.
This refactor was necessitated by the need to provide slightly different functionalities between Comma's default UI and the Sunnypilot UI while avoiding code duplication whenever possible.
The newly created files sp_priv_networking.{c,h} include the relevant elements of the network UI specifically modified for SunnyPilot. These modifications are expected to enhance the overall user experience and usability of the network interface in the SunnyPilot UI.
Please note that the 'ngrok' and 'hotspotOnBoot' functionalities have been excluded from Sunnypilot as they are not required in its use case.
The SConscript file has also been updated accordingly to include the required configurations for the new network UI files.
This update refactors the inclusion of map helper files in various source files for compatibility with SunnyPilot. This involves changes like replacing "#include selfdrive/ui/qt/maps/map_helpers.h" with "#include selfdrive/ui/sunnypilot/qt/maps/sp_priv_map_helpers.h". Added logging information in "sp_priv_onroad_home.cc" to debug the creation of map widgets. This refactoring is necessary to support map related functionalities in the SunnyPilot environment.
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
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.
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.
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'.
* espActive: `IMMEDIATE_DISABLE` -> `SOFT_DISABLE`
* only stock long
* just soft disable for now
---------
Co-authored-by: Shane Smiskol <shane@smiskol.com>
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.
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.
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.
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.
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.
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.
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.
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.
This commit updates the release_files.py script to include .git-crypt and .venv in the list of blacklisted files. This ensures that these directories are excluded from the release process, maintaining cleaner and more secure releases.
This update tries to unlock the repository with git-crypt at the start of the provision script. If the unlock is successful, it exits early, confirming access.
Check for /TICI file and install git-crypt if found
Previously, the script would exit if git-crypt was not found. Now, the script checks for the presence of the /TICI file and attempts to install git-crypt automatically if the file is detected. This change helps automate setup on systems where /TICI is present.
Remove GPG key file after import in CI script
Ensure GPG key files are removed after importing to improve security. This change mitigates the risk of accidental exposure of key files in subsequent steps.
Refactor key export path handling
Simplify and improve clarity in the key export process by defining a separate variable for the key installation path. This ensures consistency and reduces potential errors in directory management. Additionally, it automates committing and pushing the new public key to the repository.
Add provision script for git-crypt setup
This script checks for gpg and git-crypt installations and sets up a GPG key for git-crypt. It supports user input for name, email, and passphrase, with options for non-interactive execution and displays help information when requested.
Updated .gitlab-ci.yml to support automation of git-crypt provisioning and improved CI configuration.
This update adds a new stage to the pipeline for automatic provisioning of git-crypt when a change is detected in the git-crypt path. It introduces shared configurations to manage SSH key configurations, Git configurations, and git-crypt unlocking across multiple jobs. Unnecessary repetition of scripts has been minimized through reusability of these shared configurations. This ultimately enhances modularity and readability of the pipeline script.
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.
* Reapply "selfdrive/car: ban imports from external modules" (#32993)
This reverts commit 35a4a773f1.
* controls will just use controls
* also these
* ignore
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.
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.
This commit introduces several layout and functionality changes in the settings. It extracts various functionalities into separate methods, including those related to on-road settings, and removes redundant panel definitions. The changes aim to make the settings more modular, manageable, and user-friendly. Furthermore, a new file for device panel settings is added to provide a more structured way of managing device-related settings. Please note that some functionalities, such as the fleet manager pin, file system watcher, and off-road button, have been moved and included in the device panel settings. These changes do not affect the functioning of the application but provide a more maintainable code structure.
Consolidate multiple macro-defined functions into inline methods within ListWidgetSP to improve readability and maintainability. This change ensures that the widget functionalities are more straightforward and easier to debug. Adjust related headers and implementation files accordingly.
Consolidate multiple macro-defined functions into inline methods within ListWidgetSP to improve readability and maintainability. This change ensures that the widget functionalities are more straightforward and easier to debug. Adjust related headers and implementation files accordingly.
Introduced the RETURN_IF_SUNNYPILOT macro to handle conditional returns in the settings code. This ensures that certain blocks of code are bypassed when SUNNYPILOT is defined, improving modularity and reducing preprocessor directives.
Eliminated the "Driving Model" label from SoftwarePanel and refactored item management to improve code clarity and functionality. Updated macro naming and added new list widget functions for better handling of UI elements.
Moved the replaceWidget function to sunnypilot_main.h to allow for better code organization and reusability. Commented out the previous static declaration in sp_priv_offroad_home.h and updated replaceWidget calls to ReplaceWidget in sp_priv_offroad_home.cc.
This commit simplifies the conditional preprocessor directives related to SunnyPilot in various parts of the UI code. The previous use of #ifdef SUNNYPILOT has been consolidated to make the code cleaner and easier to read. Also, some unused code blocks have been removed. This refactoring simplifies the management of different configuration setups.
* Increase traversal_limit_in_words to Fix Traversal Limit Errors
* just use log_from_bytes
* come on pycharm
* no free lunch
---------
Co-authored-by: Shane Smiskol <shane@smiskol.com>
(cherry picked from commit 12d729a0a0)
Converted GPG key check logic into a more modular function `is_sunnypilot_developer` for better readability and maintainability. Updated `External Tools.xml` to include `--sunnypilot` flag in SCons build commands.
Add conditional definition for SUNNYPILOT in SConscript. This allows code to be compiled differently based on the presence of the SUNNYPILOT environment variable.
* improved PlotJuggler layout for lat accel controller
* help estimate steerActuatorDelay
* update Actuator Performance, add Vehicle Dynamics
* disable Y limits on actuator performance because sunny
* apply delay estimation feedback from harald
* gc extra custom series that PJ copied in
* label wordsmithing
* formatting
* function signatures didn't match
* function signatures didn't match
* filtered and raw mean something totally different when it comes to params
filtered and raw mean something totally different when it comes to params
* cmt
* probably better for organization
* add todo
* STASH
* revert some stuff
* clean up
* oof
* how about this
* here
* rename
* revert
* revert this too
* can do this
* ugh inside TorqueBuckets it implicitly limits steer torque to 50%!!!!!!!!
* fix
* move up
* bfg
* filter repo is the new shit
* down to 27M
* move big files to lfs; remove external and phonelibs
* wip - rebase devel; don't delete external and phonelibs anymore
* wip - rebase devel hacks
* wip - rebase devel updates
* wip - rebase updates; lfs updates
* cleaned unused scripts
* wip - lfs fixes
* bfg with rebase with correct dates
* bfg script with cherry-pick method
* latest git-filter-repo analysis
* latest git-filter-repo 'before' analysis
* new lfs import
* latest git-filter-repo analysis
* lfs update; renamed rebase repos
* renamed scripts
* different tmp folders for rewrite scripts; lfs update
* gitattributes after lfs import
* tag-commit-map file with old tags pointing to old commits
* new tags
* final touches
* squash setup commits; cherry-pick validation; reverted to commaai remote
* removed rebase version
* 0.9.7 tag in tag-commit-map
* removed unused openpilot-release-archive
* fixed archive of old history because of 2 GB limit
* archive of old history push master first
* fix tags being deleted
* cleaning and more logs
* rewrite other branches with master history
* Former-commit-id
* updates to previous commits
* cleanup
---------
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>
* update ci weekly report summary
* don't add skipped jobs to report
* uncomment job condition
* use jinja template
* add run number to failure links
* add run number to failure links
* Log for run #<num>
* use list
---------
Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>
* Chrysler Pacifica: combine 2017 and 2018 hybrids
torque params are not accurate for either (might be ~1.5 for both checking a few dongles)
* remove duplicate fingerprints
* combine docs lines
fix
* Increase traversal_limit_in_words to Fix Traversal Limit Errors
* just use log_from_bytes
* come on pycharm
* no free lunch
---------
Co-authored-by: Shane Smiskol <shane@smiskol.com>
The `kill_op` command to stop the `comma` service was removed as it is redundant. This change simplifies the `cmd` string construction and ensures the setup process starts with deleting `continue.sh` and restarting the `comma` service.
don't know what diff it makes MinimumExpanding vs Expanding so I am leaving it as I found it and some formatting on the code
Improved user interface of application
The user interface in selfdrive/ui/qt/text.cc was significantly enhanced. This was accomplished by streamlining the QVBoxLayout for displaying text and the QGridLayout for displaying buttons. The QPushButton were updated to handle actions for updating and reinstalling. Additional formatting was also added to improve the visibility of the buttons. Furthermore, unnecessary QWidget import was removed and replaced with QLabel. The QLabel was set to clear before setting newText, creating a smoother update of application status messages. Lastly, QApplication::exec() was used in place of a.exec() to cater for the button states on different platforms and handle the application's exit.
Removed the SunnylinkApi call from the registration process as it was no longer in use. Improved error logging by adding directory checks and more descriptive exception handling in the sunnylink API.
In the Sunnylink API, a line was added to reset the last ping time to zero whenever we are trying to register. The purpose of this change is to ensure that registration attempts start with a clean slate, potentially improving the reliability of the registration process.
This code update sets Sunnylink to be disabled in the event that the registration does not go through successfully. This is to ensure that resources aren't wasted trying to access unregistered Sunnylink hardware.
Updated the error logging in sunnylink.py to include the module name for clarity. In addition, adjusted the status display in sidebar.cc to shorten the "REGISTERING" status text for a cleaner user interface.
This change enhances the Sunnylink registration process by including better error checks and exception handling for cases when the public key is in use or known to be not unique. The commit also adjusts the setting of the ping time right after a successful registration. Additionally, cleanup occurred in the UI to streamline some code relating to the display of Sunnylink status. The handling of the last Sunnylink ping time has been removed from the system manager.
A new functionality has been added to the sunnylinkd script which allows for the toggling of log uploads. This includes the establishment of "DISALLOW_LOG_UPLOAD" as a threading event and a new method, "toggleLogUpload", that sets or clears this event based on whether uploads are enabled or not.
This update streamlines how the system checks the status of Sunnylink. New methods were added to `sunnylink.py` to encapsify status checking logic, such as whether the device is connected to a network, if Sunnylink is enabled, if the device is registered and if registration is needed. This resulted in simplified code in `sunnylinkd.py` and `process_config.py` as these status checks are now standardized. Furthermore, removed repetitive code in `sunnylinkd.py` by replacing it with these new methods and modified the while loop conditions according to the new status methods.
add back the dirinvg model even if dupped. it's not responisibility of this mr
Refactor Sunnylink's operation and default state handling
This update refines the operation and handling of the Sunnylink feature, focusing on its management within the launch script and the logic for its default state.
Starting with the default state, the 'SunnylinkEnabled' parameter is no longer hard-coded to 0. Instead, it now depends on the presence of a release_channel or release_sp_channel. Furthermore, Sunnylink is set to be active in all non-release builds by default.
Regarding the launch script, obsolete invocations of Sunnylink are avoided. This procedure actively checks for Sunnylink registration status before initiating the related processes, effectively conserving system resources. Also, this modifies the launching order of the mapd installer and manager.
As for the functionality of Sunnylink, crucial improvements are brought into effect:
- The status display post Sunnylink registration is made more accurate and informative, with the inclusion of a progress color.
- The handling of Sunnylink capability is overhauled, ensuring that if Sunnylink feature is disabled, a clear warning is logged and the daemon process shuts down correctly.
- System exit conditions now accommodate the Sunnylink registration status to ensure clean termination.
- The start of Sunnylink Uploader is now strictly dependent on the validation of Sunnylink registration.
- This optimization is also incorporated into the 'manage_athenad' method which now gracefully handles any potential null values for Sunnylink Dongle ID.
This comprehensive update aims to enhance the transparency, functionality, and efficient operation of the Sunnylink feature.
Removed spinner from sunnylink.py and stopped reboot prompt in sunnylink_settings.cc. The spinner was unnecessary and the reboot, instead of being prompted, will be handled differently. Additionally, timestamp of the last successful ping is now recorded upon registration in the Sunnylink service.
The sunnylink.py file was unnecessarily initiated in the launch_chffrplus.sh script. This initiation was removed to streamline the script and potentially increase overall runtime efficiency.
The commit introduces a new function, sunnylink_need_register, to check if the Sunnylink feature is registered. It also updates the process list to always include the manage_sunnylinkd process and introduces a new process for Sunnylink registration if it's enabled but not registered.
The condition for Sunnylink registration has been simplified and refactored within the main loop. Previously, the "is_registered" variable was being set outside the registration loop. Now, the checking process of the dongle ID in regard to the registration status is directly integrated into the while condition. This makes the code more concise and the process flow clearer.
The decoding method in the manage_athenad file has been refactored for parameter retrieval. Instead of decoding after receiving the parameter, decoding is now integrated in the parameter retrieval process. Also, the waiting time in the sunnylinkd.py has been reduced from 60 seconds to 10 to enhance performance and reduce lag.
Removed the static check for Sunnylink's enabled status, allowing the feature to be checked dynamically within while loops. This change ensures that if the Sunnylink feature status changes, it can immediately affect the decision-making within the process. This is particularly useful for smooth enabling or disabling of the Sunnylink feature.
The checks for the sunnylink_enabled flag have been restructured to eliminate unnecessary loop iterations. The check has been moved out of the loop to do the evaluation only once, when exiting the loop. This significantly increases the efficiency of the code.
The update introduces a 60-second delay before retrying the execution of sunnylinkd main when SunnylinkEnabled is false. This aims to prevent the immediate termination of the process when SunnylinkEnabled is turned off, allowing for a smoother transition.
The code has been adjusted to perform a check for Sunnylink registration in the main function of the sunnylinkd script. Previously, the script was checking for the SunnylinkEnabled state and if the dongle is registered at the beginning of the script. Now, these checks are executed within the main function, allowing the script to exit with a warning log if Sunnylink is not enabled.
The loop control in sunnylinkd.py was changed from 'continue' to 'break' when Sunnylink is disabled. This prevents unnecessary iterations and makes the code more efficient when the Sunnylink functionality is not in use.
The code has been updated to remove the conditional that sets exit_event in the sunnylinkd.py file. This change simplifies control flow by immediately returning to the top of the loop when Sunnylink is not enabled, instead of managing an additional event.
The code for managing sunnylink processes has been refactored and improved. A function, use_sunnylink, has been added to check if sunnylink is both enabled and registered appropriately. Additionally, the launching of process logic for 'sunnylink_uploader' and 'manage_sunnylinkd' has been adjusted to use this new function. The main function of 'sunnylinkd.py' now also checks if the sunnylink is enabled before running.
The format of the SunnylinkDongleId variable was incorrect in system manager code. It used a dictionary format instead of a tuple. This commit replaces it back with a tuple appropriately to avoid inconsistencies.
The Sunnylink dongle ID is now being formatted directly in the manager.py file, reducing redundancy. Also, the check for sunnylink_dongle_id in sunnylink.py was removed to simplify the SunnlinkEnabled conditional.
The Sunnylink integration has been refactored to improve handling of scenarios where Sunnylink is enabled but the dongle is not registered. Added checks for the registration status of the Sunnylink dongle and updated related defaults and UI indicators correspondingly. Additionally, moved the execution of the sunnylink.py script to the background during launch to prevent blocking other tasks.
The `updateButtonsLayout` function now takes a boolean argument `is_rhd` which adjusts the alignment of the on-screen buttons according to the handedness of the driving. This change was necessary to cater to right-hand drive regions, making the application more user-friendly and adaptable to global user base. No behavior change for left-hand drive.
This commit adds the custom cruise control logic in the GM interface and provides custom minimum cruise speed for GM. It also provides comprehensive updates in GM car controller to manage different scenarios in cruise control. Additionally, the update includes button control for cruise speed modification, maintaining a steady speed and considering curve speed hysteresis. Further, safety checks were implemented in the panda safety module for the GM to check cruise control actions.
Removed the condition check for sunnylink_dongle_id and instead, directly assigned a default value in case it doesn't exist. This simplifies the code by removing an unnecessary if statement.
Several changes have been made to improve the code structure of the athenad and sunnylinkd scripts. The while loop in athenad now uses end_event.wait(5) for cleaner execution control. In sunnylinkd.py, there have been additions to manage exceptions and refinements in the handling of network checks. The final major change is the inclusion of a new constant for sunnylink reconnection timeout that plays major role in various parts of the script.
This commit adds a new script, 'sync-lfs.sh'. This script assists by syncing the git large file storage (LFS) system. It backs up the current LFS configuration, uses the comma-separated configuration for operations like fetch and pull, and then restores the original configuration before pushing to the origin's main branch.
The method to copy release files in the continuous integration pipeline has been changed. Instead of using a complex cp command, we are now simply using a Python script with rsync, which provides cleaner and more readable code. The old method is still present but commented out for history or possible future use.
The mapd_manager.py file has been relocated from the selfdrive directory to the system directory. This change in location reflects the file hierarchy restructuring and improves the organization of the codebase.
The `.gitlab-ci.yml` file has been updated to directly use copy command instead of the output from release_files.py script, which was previously used in the pipeline. This change is implemented for security reasons - to validate the output and prevent exposure of unnecessary files. Warning outputs are also efficiently managed now, with the use of grep command.
This change updates the rsync command in the GitLab CI configuration file (.gitlab-ci.yml) from '-av' to '-avm'. This introduces a more efficient synchronization by reducing the amount of file metadata transferred.
The scons command in the GitLab CI file now includes the --minimal flag to boost performance by reducing unnecessary operations. In the release_files script, a redundant exclusion pattern has been removed, simplifying file matching.
The file blacklists and whitelists in release_files.py have been thoroughly updated to reflect changes in project structure and requirements. This includes additions to the sunnypilot_blacklist, such as "system/manager/gitlab_runner.sh" and "README.md", among others. The sunnypilot_whitelist has also been
The mapd_manager.py file has been relocated from the selfdrive directory to the system directory. This change in location reflects the file hierarchy restructuring and improves the organization of the codebase.
The `.gitlab-ci.yml` file has been updated to directly use copy command instead of the output from release_files.py script, which was previously used in the pipeline. This change is implemented for security reasons - to validate the output and prevent exposure of unnecessary files. Warning outputs are also efficiently managed now, with the use of grep command.
This commit significantly updates the list of release files, adding several new ones and removing numerous others. In addition, a large number of test files deemed unnecessary have been removed. This is part of a broader effort to optimize the codebase and improve efficiency.
The Docker-related files, SECURITY.md, codecov.yml, conftest.py, poetry.lock and .clang-tidy were removed from the release_files.py. This cleanup was made to ensure the release contains only the necessary files, reducing potential clutter and confusion.
This commit majorly expands the list of files to be tracked in release_files.py. The additions range from Dockerfile configurations, README documents, test files, builder scripts and many more. This might enhance the overall tracking and versioning capability for a wider scope of files across the project.
The commit adds a list of files related to GitLab CI, Docker, code formatting, and security guidelines to the release_files.py. These additions will provide more control and configuration for the release process.
Two new entries have been added to the sunnypilot_blacklist array in the release_files.py script. This now includes ".run/" and "release/ci/scons_cache/".
The changes here correct a misalignment in the import paths in the sunnylinkd.py and manage_sunnylinkd.py files. These updates ensure that system.athena modules are accurately referenced, which is critical for the function of these scripts.
We are temporarily blacklisting 'sunnylink_uploader.py' by adding it under 'sunnypilot_blacklist' in 'release/release_files.py' until it's ready for widespread roll-out. Alongside, the existing path in 'system/manager/process_config.py' has been updated to reflect the correct location of 'sunnylink_uploader.py'. This will ensure the processes are correctly managed based on its existence.
This commit adds a new script, 'sync-lfs.sh'. This script assists by syncing the git large file storage (LFS) system. It backs up the current LFS configuration, uses the comma-separated configuration for operations like fetch and pull, and then restores the original configuration before pushing to the origin's main branch.
The logging level for 'pong' and 'ping' messages in sunnylinkd.py has been changed from 'info' to 'debug'. This adjustment will help reduce the level of verbosity in the logs and focus more on significant events.
The commit enhances the logging in the selfdrive/athena/sunnylinkd.py by adding an info statement when the handle_long_poll function starts. It also modifies the create_connection function call, removing the fixed 30 seconds timeout, providing more flexibility for connection time.
The logging for an invalid JSON RPC request in athenad.py has been changed from an error log to an event log. The event log still records the request as an error, improving clarity of error handling in the system.
A debug message has been added to the log_handler function in the athenad.py file. This message will get triggered when the function is being invoked on a non-supported PC, providing a clearer indication of potential errors due to platform incompatibility.
An error logging line was added in athenad.py to capture and log the details of any invalid requests received. This additional error handling measure will help to maintain the standards of incoming requests and provide clearer debugging information.
A new parameter "LastSunnylinkPingTime" has been introduced to the manager script, it will now be tracked and stored alongside other car status parameters. Additionally, unnecessary comments and includes have been removed in the sidebar script. The "sunnylinkStatus" calculation has also been updated to accommodate empty strings and prevent potential crashes.
The commit comments out a log statement that outputs an error message if Sunnylink is offline. This change is probably a temporary measure to avoid unnecessary log messages in the output, although it may affect troubleshooting of Sunnylink connection issues.
The sunnylink ping and log statements have been refactored for clarity and optimization. Log levels were changed from debug to info, resulting in more visibility for important processes in sunnylinkd.py. The timeout before re-pinging in ws_ping() was also updated from 80% to 70% to ensure more consistent connections.
The code updates include error logging for debugging when Sunnylink goes offline. Log includes information such as the last ping time and the current time to better understand the cause of possible issues. This logging will aid in resolving status discrepancies with the Sunnylink feature.
This commit abstracts the computation of minimal lateral speed into a function named 'get_min_lateral_speed'. It simplifies the calculation logic used for lane change speed minimum in 'selfdrive/car/interfaces.py'. The 'pause_lateral_speed' value has been changed from a string to an integer and directly used in the new function. This change improves code readability and modularity.
The upload attribute name has been changed from 'user.sunnydv.upload' to 'user.sunny.upload' to improve consistency in nomenclature. Furthermore, logic has been added to handle case when there is no network connection available; the process will now sleep and retry rather than crashing or hanging.
The sunnylink_uploader.py file was modified to include headers in the upload request. The headers are gathered from the 'headers' field in the URL response JSON and passed into the 'put' request method. The debug log message was also updated to display these headers along with the upload URL.
The commit introduces more detailed log events when an attempted upload fails for any reason. Now, when there is a non-null status code like 401 or 403, it will log more information, including the decoded content of the HTTP response. This aids in quickly identifying and resolving upload issues.
Updated the base URL for SUNNYLINK to point to a new staging test environment. Changed the UPLOAD_ATTR_NAME in the sunnylink uploader from 'user.sunny.upload' to 'user.sunnydv.upload'. This provides distinction and prevents potential conflicts.
Removed 401 and 403 status codes from the success conditions in the sunnylink_uploader.py script. The handling for these status codes has been moved to the else clause, as they were unexpectedly marked as successful previously.
The commit adds sunnylink_uploader to the process_config and implements an uploader in a new file, sunnylink_uploader.py. The uploader handles listing, prioritizing, and uploading files to Sunnylink. Modified process_config to conditionally include the uploader process based on SunnylinkEnabled param and file existence. New getxattr and setxattr functions are also used to keep track of the uploaded files.
The import of the 'os' module is eliminated to clean up the code, as it is no longer needed. Furthermore, the code for removing the extended attribute from all files in the current directory has been removed as well. This streamlines the setxattr function and focuses only on setting the attributes without additional file operations.
Adjusted the logging level for certain log entries from info to debug in athenad.py and sunnylinkd.py. This change improves control over the log verbosity allowing for cleaner log files, and to debug specific sections more effectively.
The code for calculating the size of the log file has been revised. Instead of using os.path.getsize, which simply captures the size of the file on disk, we're now calculating the size of the payload after it has been serialized and encoded, plus an overhead of 100 bytes. This change provides a more accurate measure of the data that will be sent.
The `add_log_to_queue` function has been updated to compress and base64 encode log files that exceed a certain size, specifically for the "sunnylink" scenario. This function also provides logging for various stages of the process, including initial file size, size post-compression/encoding, and whether the final payload is small enough to be sent in one request. The change will improve handle of larger log files and prevent payload size related issues.
This commit decreases the maximum chunk size from 32KB to 28KB in the add_log_to_queue function in athenad.py. This size reduction will affect how the log files are loaded and processed.
Updating the maximum chunk size constant in athenad.py to decrease its value from 128KB to 32KB. This change has been made to optimize the handling of log files and data transmission.
The changes refactor the log handling in athenad.py for more efficient processing. The log is now split into maximum chunk sizes of 128KB to prevent oversized requests. Additionally, an invalid request or response exception has been introduced for better error handling.
This commit introduces network metering and PrimeType checking in sunnylinkd. The implementation includes an additional threading event and a new log handler function, 'sunny_log_handler'. It defines PrimeType and metering conditions to set and clear the new threading event as part of the main processing loop in handle_long_poll function.
The unused import, LOG_ATTR_NAME, in the file selfdrive/athena/sunnylinkd.py has been removed to provide cleaner, simpler, and more readable code. This also helps follow good coding practices such as removing unnecessary or unused imports or resources.
This commit adapts the xattr handling in the loggerd module to individual platforms, specifically macOS and others. It imports specific xattr functions based on the running system, enhancing compatibility and reducing the risk of errors. In specific, 'ENOATTR' error is now also taken into account which is relevant in some non-Linux platforms.
The attribute name used for Sunnylink's log upload function was modified. The new attribute name "user.sunny.upload" replaces the previous "sunnylink.user.upload" to reflect recent changes in naming convention.
The commit introduces a custom attribute name for Sunnylink log entries. The custom attribute name 'sunnylink.user.upload' is used for all operations in the athenad.py and sunnylinkd.py files that previously referred to the default LOG_ATTR_NAME. This will allow more flexibility in handling logs specific to Sunnylink.
The 'log_handler' thread in sunnylinkd.py was previously commented out and has now been enabled for execution. This update will allow the 'log_handler' to perform its task in the thread execution sequence.
In model_capabilities.py, the base class of ModelCapabilities has been changed from IntEnum to IntFlag to better suit requirements. This changes how the enumeration values behave and interact.
Expanded the ModelCapabilities class to better represent different model generations and their unique features. The alterations split the "DesiredCurvature" capability into two versions, "DesiredCurvatureV1" and "DesiredCurvatureV2", which have different input parameters. This change also involves updates in the "modeld.py" where conditions checking for "DesiredCurvature" are updated to check for the correct versions.
This commit updates the conditions for the model generation within the modeld.py and map.cc files. Previously, the code was specifically excluding model generation 4, but now it excludes model generations 0 and 4. This might affect features like navigation and model parameters processing.
The use of a custom model is now conditional to non-default model capabilities. This change ensures that a custom model will only be used if the model capabilities are different from the default. This prevents potential issues with using custom models that don't have any distinct capabilities or are not suitable for the current application.
This commit introduces a new class, ModelCapabilities, to manage model features. It changes initializations and conditional statements to use this new class, improving code readability and simplicity. The new class provides an easier and clearer way to check which features are enabled, reducing the complexity associated with generation-dependent feature handling.
The progress indication for downloading of driving, navigation, and metadata models has been improved. We now display "PENDING" if the progress is 0.01 or less instead of showing 0%. This change gives a more intuitive indication to the users during model downloads.
The latest change includes additional default settings for the "CustomDrivingModel" and "DrivingModelGeneration" parameters. These settings were added to the default_params list within the manager.py script to ensure correct functioning under default conditions.
Fixed the conditional statement checking the model generation and custom model status in modeld.py. Now, the navigation features and instructions are only updated if a custom model is being used and the model generation is not 4.
This commit removes the clause checking whether the user is a Sunnylink sponsor before proceeding with the restoration of sunnypilot settings. Now, all users, regardless of their sponsorship status, can restore their sunnypilot settings. The related prompts and UI elements have also been cleaned up accordingly.
In the update information for the changelog, a record of the new feature displaying the sunnylink connectivity status on the left sidebar has been added. This lets users and developers quickly see that this change has been implemented.
A new disabled color has been added to the sidebar items. This change primarily impacts the 'Sunnylink' status where a new state has been introduced. Now, when 'Sunnylink' is not enabled, it will show as 'DISABLED' in the disabled color.
Included a new 'ItemStatus' variable, 'sunnylinkStatus', to the Sidebar class and draw its metric in the UI. The status is determined by the value of 'LastSunnylinkPingTime', turning Sunnylink offline if it equals 0, online if the ping time is less than 80e9, and displaying an error otherwise.
This change introduces a connection to the "ExperimentalMode" toggle in the settings.cc file. Whenever the toggle state is flipped, the `updateToggles()` function will be called, maintaining the consistency of toggle update behavior across different settings.
Update dec_toggle enablement criteria
The changes in the code modified the condition for enabling the dec_toggle. Instead of relying on the status of custom_stock_long_planner, dec_toggle will now depend on the toggle status of experimental_mode_toggle. This will ensure the dec_toggle is only enabled when the experimental mode is active.
Enable dec_toggle based on custom_stock_long_planner status
The dec_toggle in the selfdrive user interface now mirrors the enabled status of the custom_stock_long_planner. Whenever the stock long planner toggle is switched, it will automatically enable or disable the dec_toggle.
update also experiemental to disable if no custom stock with planner speed
Update CustomStockLongPlanner settings interface
The interface for the CustomStockLongPlanner function has been updated to improve usability. A new connection to "toggleFlipped" signal was added, allowing real-time settings update. The planner is also now enabled when the long_personality_setting is toggled on. Additionally, the refresh function call for the planner has been added to ensure correct display of current settings. However, the removal of "ExperimentalMode" is now conditional, taking place only if the planner is not toggled on.
<td>{% if jobs[key]["failures"]|length > 0 %}<details>{% for failure in jobs[key]["failures"] %}<a href="{{ failure['link'] }}">Log for run #{{ failure['run_number'] }}</a><br>{% endfor %}</details>{% else %}{% endif %}</td>
# required to fetch internal or private CodeQL packs
packages:read
# only required for workflows in private repositories
actions:read
contents:read
strategy:
fail-fast:false
matrix:
include:
- language:c-cpp
build-mode:autobuild
- language:javascript-typescript
build-mode:none
- language:python
build-mode:none
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name:Checkout repository
uses:actions/checkout@v4
# Initializes the CodeQL tools for scanning.
- name:Initialize CodeQL
uses:github/codeql-action/init@v3
with:
languages:${{ matrix.language }}
build-mode:${{ matrix.build-mode }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- if:matrix.build-mode == 'manual'
shell:bash
run:|
echo 'If you are using a "manual" build mode for one or more of the' \
'languages you are analyzing, replace this with the commands to build' \
# Note: If you have issues with "push rejected missing LFS" or something make sure you disabled LFS on the GITLAB repo if you intend to use a different LFS repo other than the target repo.
* Re-tuned and tested by the community (September 29, 2024)
* UPDATED: Driving Model Selector v5
* NEW❗: Driving Model additions
* Notre Dame (July 01, 2024) - NDv3
* UPDATED: Neural Network Lateral Control (NNLC)
* NEW❗: Remove Lateral Jerk Response (Alpha)
* FIXED: Hotfix for "lazy" steering performance in tighter curves thanks to twilsonco!
* UPDATED: Toyota: Continued support for Smart DSU (SDSU) and Radar CAN Filter
* In response to the official deprecation of support for Smart DSU (SDSU) and Radar CAN Filter in the upstream ([commaai/openpilot#32777](https://github.com/commaai/openpilot/pull/32777)), sunnypilot will continue maintaining software support for Smart DSU (SDSU) and Radar CAN Filter
* UPDATED: Continued support for Mapbox navigation
Radar tracks can now be enabled manually on applicable cars through SSH thanks to [@greghogan](https://github.com/greghogan) and [@pd0wm](https://github.com/pd0wm).
Some Hyundai radars can be reconfigured to output (debug) radar points on bus 1.
Reconfiguration is done over UDS by reading/writing to 0x0142 using the Read/Write Data By Identifier
endpoints (0x22 & 0x2E). This script checks your radar firmware version against a list of known
firmware versions. If you want to try on a new radar, make sure to note the default config value
in case it is different from the other radars and you need to revert the changes.
After changing the config the car should not show any faults when openpilot is not running.
These config changes are persistent across car reboots. You need to run this script again
to go back to the default values.
**USE AT YOUR OWN RISK!** Stock system safety features, like AEB and FCW, might be affected by these changes.
**How radar points can be used along with vision:**
* Current OP long policy is identify with vision first, if vision sees a vehicle match it to a radar point. If vision sees nothing you get a false negative and no lead car detection. (Source: [Hubblesphere#7894 from comma.ai community Discord](https://discord.com/channels/469524606043160576/872899198738104330/872913890793635872))
### 🚨 Enable Radar Tracks
***(EXPERIMENTAL, as of January 1st, 2022)***
***(Only applicable to some Hyundai, Kia, and Genesis cars, as of January 1st, 2022)***
*(Base on version 0.8.12 [`devel`](https://github.com/commaai/openpilot/tree/devel))*
**USE AT YOUR OWN RISK!** Stock system safety features, like AEB and FCW, might be affected by these changes.
1. Ensure the car is at the `OFF` ignition position.
2. Connect your compatible comma device (EON, C2, C3) to the car. comma device power should be ON.
3. Use a laptop or applicable device to connect to your comma device via SSH. (Tips: Instructions to SSH in [HERE](https://github.com/commaai/openpilot/wiki/SSH))
4. In the SSH terminal after successfully connected to your comma device, execute the following commands:
*`Power on the vehicle keeping the engine off (press start button twice) then type OK to continue`.
* If successful, the following message should appear: `[DONE]. Restart your vehicle and ensure there are no faults`.
* If the script did not run successfully, reach out to the community in [Sunnyhaibin's Openpilot Discord Server](https://discord.gg/wRW3meAgtx) or `#hyundai-kia-genesis channel` on [commaai community Discord Server](https://discord.comma.ai) for assistance.
4. Reboot your comma device:
1. C3: `sudo reboot`
2. C2 or EON: `reboot`
5. Once your comma device is rebooted, start your car with engine on (with or without comma device connected). Ensure that there are no faults from the car. If there are faults, reach out to the community in [Sunnyhaibin's Openpilot Discord Server](https://discord.gg/wRW3meAgtx) or `#hyundai-kia-genesis channel` on [commaai community Discord Server](https://discord.comma.ai) for assistance.
6. Go for a quick drive and drive behind a lead car with varied follow distance. Then, come back and allow the drive to upload its `rlogs` in [comma Connect](https://connect.comma.ai).
7. With all `rlogs` uploaded, open the drive in Cabana from [comma Connect](https://connect.comma.ai). Load DBC -> `hyundai_kia_mando_front_radar.dbc`, then search `RADAR_TRACK_50x` (`x` could be anything), open any of them, and look at `LONG_DIST`.
8. If the radar tracks data is relevant with the lead car you drove behind, you are done! Your car now have radar tracks enabled.
1) Create a free mapbox account. Account will ask for a credit card for verification. You will not be charged for the free tier.
2) On the Dashboard, you will see a section called Access Tokens. Click `Create a Token`. Name it whatever you like. Set the scopes to allow everything for both Public and Secret. Copy both of these keys. **YOU WON'T BE ABLE TO ACCESS THE SECRET KEY AFTER THIS WINDOW.**
3) Once rebooted, connect your C3 to a network with internet access and find the C3’s IP address.
4) In a browser, navigate to that IP with **port 8082** (i.e 192.168.1.69:8082). You should be greeted with the Comma logo and a public key input field.
5) Paste your Public token (pk.xx), click enter, paste your Secret key (sk.xx), click enter. You can now search for places. This page will be available at your devices’s IP address/port 8082 to search for destinations.
6) To set Home and Work addresses, search for a place, select Home/Work from the dropdown and click Navigate. For non-Home/Work destinations, select Recent Places.<br>*At this time, it is not possible to search directly on the C3.*
**TIPS:**
- If your C3 is showing a black screen that says “Map Loading”, performing a reboot via the UI should fix it.
- If your phone can create a Hotspot, you are able to connect the C3 to your phone hotspot and use your phone browser to search for places.
- In the Navigation panel on the C3, you can select Home, Work, and from a list of Recent Places you have navigated to without needing a browser (assuming the C3 is connected to the internet.)
**IMPORTANT NOTE:** Your C3 will require an active internet connection to download map data, generate driving directions, and ETA. Once map data and directions are downloaded, it *is* possible to use it offline, however nothing will update (such as new driving direction after a missed turn, updated ETA, map data further into your drive etc.)
***NAVIGATION NOTE:** At this time, mapbox does not support alphanumeric addresses (i.e W123N1234 Main St). There is currently no known workaround for this.*
@@ -170,16 +170,16 @@ After running the command to install the desired branch, your comma device shoul
* Speed Limit Control (SLC) - Set speed limit based on map data or car interface (if applicable)
* HKG only: Highway Driving Assist (HDA) status integration - Use cars native speed sign detection to set desired speed (on applicable HKG cars only)
- [**Gap Adjust Cruise (GAC)**](#gap-adjust-cruise) - Allow `GAP`/`INTERVAL`/`DISTANCE` button on the steering wheel or on-screen button to adjust the follow distance from the lead car. See table below for options
- [**Quiet Drive 🤫**](#-quiet-drive) - Toggle to mute all notification sounds (excluding driver safety warnings)
- [**Auto Lane Change Timer**](#Auto-Lane-Change-Timer) - Set a timer to delay the auto lane change operation when the blinker is used. No nudge on the steering wheel is required to auto lane change if a timer is set
- [**Force Car Recognition (FCR)**](#Force-Car-Recognition-) - Use a selector to force your car to be recognized by sunnypilot
- [**Fix sunnypilot No Offroad**](#Fix-sunnypilot-No-Offroad) - Enforce sunnypilot to go offroad and turns off after shutting down the car. This feature fixes non-official devices running sunnypilot without comma power
- [**Enable ACC+MADS with RES+/SET-**](#Enable-ACC+MADS-with-RES+/SET-) - Engage both ACC and MADS with a single press of RES+ or SET- button
- [**Offline OSM Maps**](#Offline-OSM-Maps) - OSM database can now be downloaded locally for offline use[^2]. This enables offline SLC, V-TSC and M-TSC. Currently available for US South, US West, US Northeast, Florida, Taiwan, South Africa and New Zealand
- [**Various Live Tuning**](#Various-Live-Tuning) - Ability to tailor your driving experience on the fly:
* Enforce Torque Lateral Control - Use the newest [torque controller](https://blog.comma.ai/0815release/#torque-controller) for all vehicles.
* Torque Lateral Control Live Tune - Ability to adjust the torque controller’s `FRICTION` and `LAT_ACCEL_FACTOR` values to suit your vehicle.
* Torque Lateral Controller Self-Tune - Enable automatic turning for the Torque controller.
- [**Quiet Drive 🤫**](#-quiet-drive) - Toggle to mute all notification sounds (excluding driver safety warnings)
- [**Auto Lane Change Timer**](#Auto-Lane-Change-Timer) - Set a timer to delay the auto lane change operation when the blinker is used. No nudge on the steering wheel is required to auto lane change if a timer is set
- [**Force Car Recognition (FCR)**](#Force-Car-Recognition-) - Use a selector to force your car to be recognized by sunnypilot
- [**Fix sunnypilot No Offroad**](#Fix-sunnypilot-No-Offroad) - Enforce sunnypilot to go offroad and turns off after shutting down the car. This feature fixes non-official devices running sunnypilot without comma power
- [**Enable ACC+MADS with RES+/SET-**](#Enable-ACC+MADS-with-RES+/SET-) - Engage both ACC and MADS with a single press of RES+ or SET- button
- [**Offline OSM Maps**](#Offline-OSM-Maps) - OSM database can now be downloaded locally for offline use[^2]. This enables offline SLC, V-TSC and M-TSC. Currently available for US South, US West, US Northeast, Florida, Taiwan, South Africa and New Zealand
- [**Various Live Tuning**](#Various-Live-Tuning) - Ability to tailor your driving experience on the fly:
* Enforce Torque Lateral Control - Use the newest [torque controller](https://blog.comma.ai/0815release/#torque-controller) for all vehicles.
* Torque Lateral Control Live Tune - Ability to adjust the torque controller’s `FRICTION` and `LAT_ACCEL_FACTOR` values to suit your vehicle.
* Torque Lateral Controller Self-Tune - Enable automatic turning for the Torque controller.
### Visual Enhancements
* **M.A.D.S Status Icon** - Dedicated icon to display M.A.D.S. engagement status
@@ -223,7 +223,7 @@ The goal of Modified Assistive Driving Safety (MADS) is to enhance the user driv
* `SET-` button enables ACC/SCC
* `CANCEL` button only disables ACC/SCC
* `CRUISE (MAIN)` must be `ON` to use ACC/SCC
* `CRUISE (MAIN)` button disables sunnypilot completely when `OFF` **(strictly enforced in panda safety code)**
* `CRUISE (MAIN)` button disables ACC/SCC completely when `OFF` **(strictly enforced in panda safety code)**
### Disengage Lateral ALC on Brake Press Mode toggle
Dedicated toggle to handle Lateral state on brake pedal press and release:
A supported vehicle is one that just works when you install a comma device. All supported cars provide a better experience than any stock system. Supported vehicles reference the US market unless otherwise specified.
A car port enables openpilot support on a particular car. Each car model openpilot supports needs to be individually ported. All car ports live in `openpilot/selfdrive/car/`.
The complexity of a car port varies depending on many factors including:
* existing openpilot support for similar cars
* architecture and APIs available in the car
# Structure of a car port
*`interface.py`: Interface for the car, defines the CarInterface class
*`carstate.py`: Reads CAN from car and builds openpilot CarState message
*`carcontroller.py`: Builds CAN messages to send to car
*`values.py`: Limits for actuation, general constants for cars, and supported car documentation
*`radar_interface.py`: Interface for parsing radar points from the car
# Overiew
[Jason Young](https://github.com/jyoung8607) gave a talk at COMMA_CON with an overview of the car porting process. The talk is available on YouTube:
openpilot records routes in one minute chunks called segments. A route starts on the rising edge of ignition and ends on the falling edge.
Check out our [python library](https://github.com/commaai/openpilot/blob/master/tools/lib/logreader.py) for reading openpilot logs. Also checkout our [tools](https://github.com/commaai/openpilot/tree/master/tools) to replay and view your data. These are the same tools we use to debug and develop openpilot.
## log types
Check out our [Python library](https://github.com/commaai/openpilot/blob/master/tools/lib/logreader.py) for reading openpilot logs. Also checkout our [tools](https://github.com/commaai/openpilot/tree/master/tools) to replay and view your data. These are the same tools we use to debug and develop openpilot.
For each segment, openpilot records the following log types:
@@ -15,9 +13,10 @@ rlogs contain all the messages passed amongst openpilot's processes. See [cereal
## {f,e,d}camera.hevc
Each camera stream is H.265 encoded and written to its respective file.
[openpilot](http://github.com/commaai/openpilot) is an open source driver assistance system. Currently, openpilot performs the functions of Adaptive Cruise Control (ACC), Automated Lane Centering (ALC), Forward Collision Warning (FCW), and Lane Departure Warning (LDW) for a growing variety of [supported car makes, models, and model years](docs/CARS.md). In addition, while openpilot is engaged, a camera-based Driver Monitoring (DM) feature alerts distracted and asleep drivers. See more about [the vehicle integration](docs/INTEGRATION.md) and [limitations](docs/LIMITATIONS.md).
[openpilot](http://github.com/commaai/openpilot) is an open source driver assistance system. Currently, openpilot performs the functions of Adaptive Cruise Control (ACC), Automated Lane Centering (ALC), Forward Collision Warning (FCW), and Lane Departure Warning (LDW) for a growing variety of [supported car makes, models, and model years](https://github.com/commaai/openpilot/blob/master/docs/CARS.md). In addition, while openpilot is engaged, a camera-based Driver Monitoring (DM) feature alerts distracted and asleep drivers. See more about [the vehicle integration](https://github.com/commaai/openpilot/blob/master/docs/INTEGRATION.md) and [limitations](https://github.com/commaai/openpilot/blob/master/docs/LIMITATIONS.md).
A comma 3/3X is a normal [Linux](https://github.com/commaai/agnos-builder) computer that exposes [SSH](https://wiki.archlinux.org/title/Secure_Shell) and a [serial console](https://wiki.archlinux.org/title/Working_with_the_serial_console).
## Serial Console
On both the comma three and 3X, the serial console is accessible from the main OBD-C port.
Connect the comma 3/3X to your computer with a normal USB C cable, or use a [comma serial](https://comma.ai/shop/comma-serial) for steady 12V power.
On the comma three, the serial console is exposed through a UART-to-USB chip, and `tools/serial/connect.sh` can be used to connect.
On the comma 3X, the serial console is accessible through the [panda](https://github.com/commaai/panda) using the `panda/tests/som_debug.sh` script.
## SSH
In order to SSH into your device, you'll need a GitHub account with SSH keys. See this [GitHub article](https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh) for getting your account setup with SSH keys.
* Enable SSH in your device's settings
* Enter your GitHub username in the device's settings
* Connect to your device
* Username: `comma`
* Port: `22` or `8022`
* Username: `comma`
* Port: `22`
Here's an example command for connecting to your device using its tethered connection:<br />
`ssh comma@192.168.43.1`
For doing development work on device, it's recommended to use [SSH agent forwarding](https://docs.github.com/en/developers/overview/using-ssh-agent-forwarding).
## Notes
### Notes
The public keys are only fetched from your GitHub account once. In order to update your device's authorized keys, you'll need to re-enter your GitHub username.
The `id_rsa` key in this directory only works while your device is in the setup state with no software installed. After installation, that default key will be removed.
See the [community wiki](https://github.com/commaai/openpilot/wiki/SSH) for more detailed instructions and information.
#### ssh.comma.ai proxy
# Connecting to ssh.comma.ai
SSH into your comma device from anywhere with `ssh.comma.ai`. Requires a [comma prime subscription](https://comma.ai/connect).
With a [comma prime subscription](https://comma.ai/connect), you can SSH into your comma device from anywhere.
## Setup
With software version 0.6.1 or newer, enter your GitHub username on your device under Developer Settings. Your GitHub authorized public keys will become your authorized SSH keys for `ssh.comma.ai`. You can add any additional keys in `/system/comma/home/.ssh/authorized_keys.persist`.
## Recommended .ssh/config
With the below SSH configuration, you can type `ssh comma-{dongleid}` to connect to your device through `ssh.comma.ai`.<br />
For example: `ssh comma-ffffffffffffffff`
With the below SSH configuration, you can type `ssh comma-{dongleid}` to connect to your device through `ssh.comma.ai`.
The line right above contains the actual speed. Unfortunately, COLOR_BLUE isn’t defined, but a git grep of COLOR_WHITE shows it’s nvgRGBA(255, 255, 255, 255). Personally, I like a lighter blue, so I went with #8080FF.
"numpy < 2.0.0",# control does not support numpy 2
"numpy",
# body / webrtcd
"aiohttp",
@@ -52,27 +52,30 @@ dependencies = [
"websocket_client",
# acados deps
"casadi",
"casadi @ https://github.com/commaai/casadi/releases/download/nightly-release-3.6.6/casadi-3.6.6-cp312-none-manylinux2014_aarch64.whl ; (python_version == '3.12' and platform_machine == 'aarch64')",# TODO: Go back to pypi casadi when they fix aarch64 for python312
"casadi; platform_machine != 'aarch64' or python_version != '3.12'",
"future-fstrings",
# these should be removed
"psutil",
"pycryptodome",# used in updated/casync, panda, body, and a test
"title":"🎉 sunnypilot `${NEW_BRANCH}` New Update 🎉",
"description":"[sunnypilot](${PUBLIC_REPO_URL}): Build #${CI_PIPELINE_IID} of branch [${NEW_BRANCH}](${PUBLIC_REPO_URL}/tree/${NEW_BRANCH}) has been published.\n\nDrive safe! 🚗💨",
"description":"[sunnypilot](${PUBLIC_REPO_URL}): Build #${EXTRA_VERSION_IDENTIFIER} of branch [${NEW_BRANCH}](${PUBLIC_REPO_URL}/tree/${NEW_BRANCH}) has been published.\n\nDrive safe! 🚗💨",
# the git-filter-repo analysis is bliss - can be found in the repo root/filter-repo/analysis
echo"Analyzing with git-filter-repo..."
/tmp/git-filter-repo --force --analyze
echo"Pushing to openpilot-archive..."
# push to archive repo - in smaller parts because the 2 GB push limit - https://docs.github.com/en/get-started/using-git/troubleshooting-the-2-gb-push-limit
git push --prune $ARCHIVE_REPO +refs/heads/master:refs/heads/master # push master first so it's the default branch (when openpilot-archive is an empty repo)
# git push --mirror $ARCHIVE_REPO || true # fails to push refs/pull/* (deny updating a hidden ref) for pull requests
# we fail and continue - more reading: https://stackoverflow.com/a/34266401/639708 and https://blog.plataformatec.com.br/2013/05/how-to-properly-mirror-a-git-repository/
fi
# REWRITE master and tags
if[ ! -d $SRC_CLONE];then
echo"Cloning $SRC..."
GIT_LFS_SKIP_SMUDGE=1 git clone $SRC$SRC_CLONE
cd$SRC_CLONE
echo"Checking out old history..."
git checkout tags/v0.7.1 > /dev/null 2>&1
# checkout as main, since we need master ref later
git checkout -b main
echo"Creating setup commits..."
# rm these so we don't get conflicts later
git rm -r cereal opendbc panda selfdrive/ui/ui > /dev/null
# echo -ne "[$CURRENT_COMMIT_NUMBER/$TOTAL_COMMITS] Comparing old commit $OLD_COMMIT_SHORT ($OLD_DATE) with new commit $NEW_COMMIT_SHORT ($NEW_DATE)"\\r
echo"[$CURRENT_COMMIT_NUMBER/$TOTAL_COMMITS] Comparing old commit $OLD_COMMIT_SHORT ($OLD_DATE) with new commit $NEW_COMMIT_SHORT ($NEW_DATE)"
# generate lists of files and their hashes for the old and new commits, excluding ignored files
if diff <(echo"$OLD_FILES") <(echo"$NEW_FILES") > /dev/null;then
# echo "Old commit $OLD_COMMIT_SHORT and new commit $NEW_COMMIT_SHORT are equivalent."
COUNT_SAME=$((COUNT_SAME +1))
else
echo"[$CURRENT_COMMIT_NUMBER/$TOTAL_COMMITS] Difference found between old commit $OLD_COMMIT_SHORT and new commit $NEW_COMMIT_SHORT" >> $COMMIT_DIFF_LOG
# delete pull request refs since we can't alter them anyway (https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally#error-failed-to-push-some-refs)
# using this instead to ignore refs/pull/* - since this is also what --mirror does - https://blog.plataformatec.com.br/2013/05/how-to-properly-mirror-a-git-repository/
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.