Handle datasheet to 3-phase conversion. Args: T0H: Time HIGH for '0' bit (nanoseconds) T0L: Time LOW for '0' bit (nanoseconds) T1H: Time HIGH for '1' bit (nanoseconds) T1L: Time LOW for '1' bit (nanoseconds) verbose: Whether to show verbose output
(T0H: int, T0L: int, T1H: int, T1L: int, verbose: bool)
| 564 | |
| 565 | |
| 566 | def handle_datasheet(T0H: int, T0L: int, T1H: int, T1L: int, verbose: bool) -> None: |
| 567 | """Handle datasheet to 3-phase conversion. |
| 568 | |
| 569 | Args: |
| 570 | T0H: Time HIGH for '0' bit (nanoseconds) |
| 571 | T0L: Time LOW for '0' bit (nanoseconds) |
| 572 | T1H: Time HIGH for '1' bit (nanoseconds) |
| 573 | T1L: Time LOW for '1' bit (nanoseconds) |
| 574 | verbose: Whether to show verbose output |
| 575 | """ |
| 576 | ds = TimingDatasheet(T0H, T0L, T1H, T1L) |
| 577 | fl = datasheet_to_phase3(ds) |
| 578 | |
| 579 | if verbose: |
| 580 | print(f"Datasheet Format: {ds}") |
| 581 | print(f"3-Phase Format: {fl}") |
| 582 | print_phase3_cpp_definition(fl) |
| 583 | else: |
| 584 | print(f"T1={fl.T1} T2={fl.T2} T3={fl.T3}") |
| 585 | |
| 586 | |
| 587 | def handle_fastled(T1: int, T2: int, T3: int, verbose: bool) -> None: |
no test coverage detected