MCPcopy Create free account
hub / github.com/FastLED/FastLED / main

Function main

ci/autoresearch/driver_sweep.py:482–556  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

480
481
482def main() -> int:
483 parser = argparse.ArgumentParser(
484 description="Driver sweep test — tests multiple LED strip sizes and lane configurations for any driver"
485 )
486 parser.add_argument(
487 "--driver",
488 type=str,
489 required=True,
490 help="Driver to test (e.g., PARLIO, RMT, SPI, I2S, UART, LCD_RGB)",
491 )
492 parser.add_argument(
493 "--port",
494 type=str,
495 help="Serial port (auto-detected if not specified)",
496 )
497 parser.add_argument(
498 "--verbose",
499 "-v",
500 action="store_true",
501 help="Enable verbose RPC output",
502 )
503 parser.add_argument(
504 "--timeout",
505 type=float,
506 default=120.0,
507 help="Per-test timeout in seconds (default: 120)",
508 )
509 parser.add_argument(
510 "--skip-flash",
511 action="store_true",
512 help="Skip compile/upload (assume device already flashed)",
513 )
514 args = parser.parse_args()
515
516 driver = args.driver.upper()
517
518 # Detect port
519 port: str = args.port or ""
520 if not port:
521 print("Auto-detecting serial port...")
522 result = auto_detect_upload_port("esp32c6")
523 if not result.ok:
524 print("ERROR: No USB serial port found. Plug in the device or use --port.")
525 return 1
526 port = str(result.selected_port)
527 print(f"Found: {port}")
528
529 # Optionally compile and upload
530 if not args.skip_flash:
531 print(f"\nCompiling and uploading AutoResearch sketch...")
532 print("(Use --skip-flash to skip this step if already flashed)\n")
533 compile_cmd = [
534 "bash",
535 "compile",
536 "esp32c6",
537 "--examples",
538 "AutoResearch",
539 ]

Callers 1

driver_sweep.pyFile · 0.70

Calls 6

auto_detect_upload_portFunction · 0.90
run_sweepFunction · 0.85
parse_argsMethod · 0.80
print_summaryFunction · 0.70
printFunction · 0.50
runMethod · 0.45

Tested by

no test coverage detected