fix #19, #81, #82: Custom command line arguments for picocom

Esse commit está contido em:
Victor Nakoryakov
2013-09-24 17:45:40 +04:00
commit 1edc68ad40
2 arquivos alterados com 8 adições e 2 exclusões
+2
Ver Arquivo
@@ -108,6 +108,8 @@ Changelog
* Fix #23, #28: `make` is searched within Arduino IDE binaries as well * 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 #88, #103: Correct version parsing for some distributions that mangle it
* Fix #46: Taking build number into account in version string * 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 0.3.5
* Fix #62: Include `MIT-LICENSE.txt` in the tarball. * Fix #62: Include `MIT-LICENSE.txt` in the tarball.
+6 -2
Ver Arquivo
@@ -22,6 +22,10 @@ class Serial(Command):
help='Serial port to communicate with\nTry to guess if not specified') help='Serial port to communicate with\nTry to guess if not specified')
parser.add_argument('-b', '--baud-rate', metavar='RATE', type=int, default=9600, 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') 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): def run(self, args):
serial_monitor = self.e.find_tool('serial', ['picocom'], human_name='Serial monitor (picocom)') serial_monitor = self.e.find_tool('serial', ['picocom'], human_name='Serial monitor (picocom)')
@@ -31,5 +35,5 @@ class Serial(Command):
serial_monitor, serial_monitor,
serial_port, serial_port,
'-b', str(args.baud_rate), '-b', str(args.baud_rate),
'-l', '-l'
]) ] + args.remainder)