slotUI/SlotCli.py

changeset 100
039ab094f79b
parent 99
434d60dc9b12
child 101
92d204c738e1
equal deleted inserted replaced
99:434d60dc9b12 100:039ab094f79b
450 help="Required for programming a car directly", metavar="[0-5]") 450 help="Required for programming a car directly", metavar="[0-5]")
451 parser.add_option("--fuel", dest="fuel", 451 parser.add_option("--fuel", dest="fuel",
452 help="Set maximum CAR fuel level", metavar="[0-15]") 452 help="Set maximum CAR fuel level", metavar="[0-15]")
453 parser.add_option("--brake", dest="brake", 453 parser.add_option("--brake", dest="brake",
454 help="Set CAR brake strength", metavar="[0-15]") 454 help="Set CAR brake strength", metavar="[0-15]")
455 parser.add_option("--speed", dest="speed", 455 parser.add_option("--accel", dest="accel",
456 help="Set maximum CAR speed", metavar="[0-15]") 456 help="Set CAR acceleration ", metavar="[6-15]")
457 parser.add_option("--blink", dest="blink", 457 parser.add_option("--blink", dest="blink",
458 help="Set car lights blinking state", metavar="[on|off]") 458 help="Set car lights blinking state", metavar="[on|off]")
459 parser.add_option("--limit", dest="limit", 459 parser.add_option("--limit", dest="limit",
460 help="Controlled SPEED LIMIT (15 = no limit)", metavar="[0-15]") 460 help="Controlled SPEED LIMIT (15 = no limit)", metavar="[0-15]")
461 parser.add_option("--drive", dest="drive", 461 parser.add_option("--drive", dest="drive",
478 sys.exit(1) 478 sys.exit(1)
479 479
480 if options.fuel: 480 if options.fuel:
481 print "setFuel: " + cli.box.progcar(int(options.carid), "fuel", int(options.fuel)) 481 print "setFuel: " + cli.box.progcar(int(options.carid), "fuel", int(options.fuel))
482 482
483 if options.speed: 483 if options.accel:
484 print "setSpeed: " + cli.box.progcar(int(options.carid), "speed", int(options.speed)) 484 print "setAccel: " + cli.box.progcar(int(options.carid), "accel", int(options.accel))
485 485
486 if options.brake: 486 if options.brake:
487 print "setBrake: " + cli.box.progcar(int(options.carid), "brake", int(options.brake)) 487 print "setBrake: " + cli.box.progcar(int(options.carid), "brake", int(options.brake))
488 488
489 if options.blink: 489 if options.blink:

mercurial