--- a/slotUI/SlotCli.py Sat Dec 03 13:53:44 2011 +0100 +++ b/slotUI/SlotCli.py Sat Dec 03 14:25:06 2011 +0100 @@ -33,6 +33,8 @@ help="Set maximum CAR speed", metavar="[0-15]") parser.add_option("--blink", dest="blink", help="Set car lights blinking state", metavar="[on|off]") + parser.add_option("--limit", dest="limit", + help="Controlled SPEED LIMIT (15 = no limit)", metavar="[0-15]") (options, args) = parser.parse_args() cli = SlotCli() @@ -43,14 +45,22 @@ if options.carid == None: print "Option --carid is required for all car programming commands!\nUse --help to get a list of available commands" sys.exit(1) + if options.fuel != None: print "setFuel: " + cli.box.progcar(int(options.carid), "fuel", int(options.fuel)) + if options.speed != None: print "setSpeed: " + cli.box.progcar(int(options.carid), "speed", int(options.speed)) + if options.brake != None: print "setBrake: " + cli.box.progcar(int(options.carid), "brake", int(options.brake)) + if options.blink != None: state = False if options.blink == "on": state = True print "setBlink: " + cli.box.blinkcar(int(options.carid), state) + + if options.limit != None: + print "Change Speed Limit: " + cli.box.speedlimit(int(options.carid), int(options.limit)) +