From af70755b4934688503eef007b69ab430cc127ce4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Weigert?= Date: Sun, 29 Sep 2019 12:06:10 +0200 Subject: [PATCH] Option --brightness fixed. --- led-badge-11x44.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/led-badge-11x44.py b/led-badge-11x44.py index 10dcb16..55f0ce2 100755 --- a/led-badge-11x44.py +++ b/led-badge-11x44.py @@ -46,6 +46,7 @@ # v0.8, 2019-05-23, jw Support usb.core on windows via libusb-win32 # v0.9, 2019-07-17, jw Support 48x12 configuration too. # v0.10, 2019-09-09, jw Support for loading monochrome images. Typos fixed. +# v0.11, 2019-09-29, jw New option --brightness added. import sys, os, re, time, argparse from datetime import datetime @@ -77,7 +78,7 @@ or sys.exit(1) -__version = "0.10" +__version = "0.11" font_11x44 = ( # 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' @@ -496,7 +497,7 @@ else: print("Type: 11x44") buf = array('B') -buf.extend(header(list(map(lambda x: x[1], msgs)), args.speed, args.mode, args.blink, args.ants, args.brightness)) +buf.extend(header(list(map(lambda x: x[1], msgs)), args.speed, args.mode, args.blink, args.ants, int(args.brightness))) for msg in msgs: buf.extend(msg[0])