()
| 39 | |
| 40 | |
| 41 | def build_arg_parser() -> argparse.ArgumentParser: |
| 42 | parser = argparse.ArgumentParser( |
| 43 | description="ESP32 Serial Monitor with Memory Graph - Real-time monitoring, graphing, and command interface" |
| 44 | ) |
| 45 | parser.add_argument( |
| 46 | "port", |
| 47 | nargs="?", |
| 48 | default=None, |
| 49 | help="Serial port (leave empty for autodetection)", |
| 50 | ) |
| 51 | parser.add_argument( |
| 52 | "--baud", |
| 53 | type=int, |
| 54 | default=DEFAULT_BAUDRATE, |
| 55 | help=f"Baud rate (default: {DEFAULT_BAUDRATE})", |
| 56 | ) |
| 57 | parser.add_argument( |
| 58 | "--filter", |
| 59 | type=str, |
| 60 | default="", |
| 61 | help="Only display lines containing this keyword (case-insensitive)", |
| 62 | ) |
| 63 | parser.add_argument( |
| 64 | "--suppress", |
| 65 | type=str, |
| 66 | default="", |
| 67 | help="Suppress lines containing this keyword (case-insensitive)", |
| 68 | ) |
| 69 | return parser |
| 70 | |
| 71 | |
| 72 | if any(arg in ("-h", "--help") for arg in sys.argv[1:]): |
no outgoing calls
no test coverage detected