tools/pyboard.py: Add -d as an alias for --device.

v1.13-wasp-os
Lars Kellogg-Stedman 2020-03-25 13:31:18 -04:00 committed by Damien George
parent 1cf994c48b
commit 3a0f64fc7a
2 changed files with 5 additions and 4 deletions

View File

@ -24,8 +24,8 @@ Running ``pyboard.py --help`` gives the following output:
.. code-block:: text .. code-block:: text
usage: pyboard [-h] [--device DEVICE] [-b BAUDRATE] [-u USER] usage: pyboard [-h] [-d DEVICE] [-b BAUDRATE] [-u USER] [-p PASSWORD]
[-p PASSWORD] [-c COMMAND] [-w WAIT] [--follow] [-f] [-c COMMAND] [-w WAIT] [--follow | --no-follow] [-f]
[files [files ...]] [files [files ...]]
Run scripts on the pyboard. Run scripts on the pyboard.
@ -35,8 +35,8 @@ Running ``pyboard.py --help`` gives the following output:
optional arguments: optional arguments:
-h, --help show this help message and exit -h, --help show this help message and exit
--device DEVICE the serial device or the IP address of the -d DEVICE, --device DEVICE
pyboard the serial device or the IP address of the pyboard
-b BAUDRATE, --baudrate BAUDRATE -b BAUDRATE, --baudrate BAUDRATE
the baud rate of the serial device the baud rate of the serial device
-u USER, --user USER the telnet login username -u USER, --user USER the telnet login username

View File

@ -557,6 +557,7 @@ def main():
cmd_parser = argparse.ArgumentParser(description="Run scripts on the pyboard.") cmd_parser = argparse.ArgumentParser(description="Run scripts on the pyboard.")
cmd_parser.add_argument( cmd_parser.add_argument(
"-d",
"--device", "--device",
default=os.environ.get("PYBOARD_DEVICE", "/dev/ttyACM0"), default=os.environ.get("PYBOARD_DEVICE", "/dev/ttyACM0"),
help="the serial device or the IP address of the pyboard", help="the serial device or the IP address of the pyboard",