mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-06-20 01:02:07 +08:00
1bd2a2f007
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.