mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-08-20 13:43:45 +08:00
modeld_v2: restore chestnut link check before big model build
This commit is contained in:
@@ -296,14 +296,14 @@ def _load_policy_runners(args: argparse.Namespace) -> tuple[list, list]:
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
# if 'USB' in os.getenv('DEV', '') or os.getenv('USBGPU'):
|
||||
# from openpilot.system.hardware.chestnut.flash import link_up
|
||||
# for _ in range(10):
|
||||
# if link_up():
|
||||
# break
|
||||
# time.sleep(1)
|
||||
# else:
|
||||
# raise RuntimeError("Chestnut not ready, skipping big model build")
|
||||
if 'USB' in os.getenv('DEV', '') or os.getenv('USBGPU'):
|
||||
from openpilot.system.hardware.chestnut.flash import link_up
|
||||
for _ in range(10):
|
||||
if link_up():
|
||||
break
|
||||
time.sleep(1)
|
||||
else:
|
||||
raise RuntimeError("Chestnut not ready, skipping big model build")
|
||||
|
||||
from openpilot.common.file_chunker import chunk_file, get_chunk_targets
|
||||
from openpilot.selfdrive.modeld.get_model_metadata import make_metadata_dict
|
||||
|
||||
Reference in New Issue
Block a user