parser=argparse.ArgumentParser(formatter_class=argparse.RawDescriptionHelpFormatter,description='Upload messages or graphics to a 44x11 led badge via USB HID.\nVersion %s from https://github.com/jnweiger/led-badge-44x11\n -- see there for more examples and for updates.'%__version,epilog='Example combining image and text:\n sudo %s"I:HEART2:you"'%sys.argv[0])
parser=argparse.ArgumentParser(formatter_class=argparse.RawDescriptionHelpFormatter,description='Upload messages or graphics to a 44x11 led badge via USB HID.\nVersion %s from https://github.com/jnweiger/led-badge-ls32\n -- see there for more examples and for updates.'%__version,epilog='Example combining image and text:\n sudo %s"I:HEART2:you"'%sys.argv[0])
parser.add_argument('-t','--type',default='11x44',help="Type of display: supported values are 12x48 or (default) 11x44. Rename the program to led-badge-12x48, to switch the default.")
parser.add_argument('-s','--speed',default='4',help="Scroll speed (Range 1..8). Up to 8 comma-seperated values")
parser.add_argument('-s','--speed',default='4',help="Scroll speed (Range 1..8). Up to 8 comma-seperated values")
parser.add_argument('-m','--mode',default='0',help="Up to 8 mode values: Scroll-left(0) -right(1) -up(2) -down(3); still-centered(4); animation(5); drop-down(6); curtain(7); laser(8); See '--mode-help' for more details.")
parser.add_argument('-m','--mode',default='0',help="Up to 8 mode values: Scroll-left(0) -right(1) -up(2) -down(3); still-centered(4); animation(5); drop-down(6); curtain(7); laser(8); See '--mode-help' for more details.")
parser.add_argument('-b','--blink',default='0',help="1: blinking, 0: normal. Up to 8 comma-seperated values")
parser.add_argument('-b','--blink',default='0',help="1: blinking, 0: normal. Up to 8 comma-seperated values")
@ -451,6 +453,16 @@ for arg in args.message:
ifbitmaps_preloaded_unused==True:
ifbitmaps_preloaded_unused==True:
print("\nWARNING:\n Your preloaded images are not used.\n Try without '-p' or embed the control character '^A' in your message.\n")
print("\nWARNING:\n Your preloaded images are not used.\n Try without '-p' or embed the control character '^A' in your message.\n")
if'12'inargs.typeor'12'insys.argv[0]:
print("Type: 12x48")
formsginmsgs:
# trivial hack to support 12x48 badges:
# patch extra empty lines into the message stream.