diff -r 1defce561e64 -r 11fabe1f7c40 slotUI/SlotCli.py --- a/slotUI/SlotCli.py Sun Oct 28 17:57:54 2012 +0100 +++ b/slotUI/SlotCli.py Sun Oct 28 18:04:38 2012 +0100 @@ -50,10 +50,10 @@ #Popen(["/usr/bin/mpg123", SOUNDS[what]]).pid class SlotCli(): - def __init__(self, test = None): + def __init__(self, test = None, dev=""): self.box = Blackbox() if not test: - self.box.connect() + self.box.connect(dev) self.slot_dummy = { "name": "Unnamed", "laps": 0, @@ -564,9 +564,13 @@ help="Controlled SPEED MINIMUM (0 = disabled)", metavar="[0-15]") parser.add_option("--test", dest="test", action="store_true", default=False, help="", metavar="") + parser.add_option("--dev", dest="dev", default="/dev/ttyUSB0", + help="Communication port", metavar="[/dev/ttyUSB0]") (options, args) = parser.parse_args() - cli = SlotCli(options.test) + #if not options.dev: + # options.dev = "/dev/ttyUSB0" + cli = SlotCli(options.test, options.dev) # should a CLI function be started? if options.live: