mirror of
https://jihulab.com/mr-one/openpilot.git
synced 2026-10-27 21:13:42 +08:00
models: auto-download default model (CD210) when no qcom bundle selected
Mirror upstream first-boot behavior: with nothing selected on qcom, queue DEFAULT_MODEL_REF so the default model (CD210) is downloaded and activated automatically, instead of falling back to the stock selfdrive modeld (which needs a compile-format pkl that is not shipped here).
This commit is contained in:
@@ -334,6 +334,17 @@ class ModelManagerSP:
|
||||
if DEFAULT_MODEL_REF:
|
||||
self.params.put("ModelManager_DownloadRef", DEFAULT_MODEL_REF)
|
||||
|
||||
# First-boot default: no qcom bundle selected -> auto-use the default
|
||||
# model (DEFAULT_MODEL_REF, i.e. CD210) instead of falling back to the
|
||||
# stock selfdrive modeld. Mirrors upstream: the default model runs on
|
||||
# first boot without any user selection (downloaded once, then active).
|
||||
if (get_selected_bundle(self.params, "qcom") is None
|
||||
and self.params.get("ModelManager_DownloadRef") is None
|
||||
and not self.chestnut_present):
|
||||
from openpilot.sunnypilot.models.model_name import DEFAULT_MODEL_REF
|
||||
if DEFAULT_MODEL_REF:
|
||||
self.params.put("ModelManager_DownloadRef", DEFAULT_MODEL_REF)
|
||||
|
||||
self._process_download_requests()
|
||||
|
||||
if self.params.get("ModelManager_ClearCache"):
|
||||
|
||||
Reference in New Issue
Block a user