From 1edc68ad403dba39bf0f4447805e3a557d3c403b Mon Sep 17 00:00:00 2001 From: Victor Nakoryakov Date: Tue, 24 Sep 2013 17:45:40 +0400 Subject: [PATCH] fix #19, #81, #82: Custom command line arguments for picocom --- README.rst | 2 ++ ino/commands/serial.py | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index fd0d86c..b7fb205 100644 --- a/README.rst +++ b/README.rst @@ -108,6 +108,8 @@ Changelog * Fix #23, #28: `make` is searched within Arduino IDE binaries as well * Fix #88, #103: Correct version parsing for some distributions that mangle it * Fix #46: Taking build number into account in version string + * Fix #19, #81, #82: Custom command line arguments for `picocom` can be passed + while running `ino serial` 0.3.5 * Fix #62: Include `MIT-LICENSE.txt` in the tarball. diff --git a/ino/commands/serial.py b/ino/commands/serial.py index 1c99034..92ab8a4 100644 --- a/ino/commands/serial.py +++ b/ino/commands/serial.py @@ -22,6 +22,10 @@ class Serial(Command): help='Serial port to communicate with\nTry to guess if not specified') parser.add_argument('-b', '--baud-rate', metavar='RATE', type=int, default=9600, help='Communication baud rate, should match value set in Serial.begin() on Arduino') + parser.add_argument('remainder', nargs='*', metavar='ARGS', + help='Extra picocom args that are passed as is') + + parser.usage = "%(prog)s [-h] [-p PORT] [-b RATE] [-- ARGS]" def run(self, args): serial_monitor = self.e.find_tool('serial', ['picocom'], human_name='Serial monitor (picocom)') @@ -31,5 +35,5 @@ class Serial(Command): serial_monitor, serial_port, '-b', str(args.baud_rate), - '-l', - ]) + '-l' + ] + args.remainder)