diff --git a/openpilot/sunnypilot/modeld_v2/compile_modeld.py b/openpilot/sunnypilot/modeld_v2/compile_modeld.py index c99a7c9d25..927e5f3392 100755 --- a/openpilot/sunnypilot/modeld_v2/compile_modeld.py +++ b/openpilot/sunnypilot/modeld_v2/compile_modeld.py @@ -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