Mercurial > louis > kiibohd-controller
diff Scan/STLcd/bitmap2Struct.py @ 398:63b1d003fd50
Stop requiring editing of example scripts
The example scripts include hardcoded values that
do not work for everyone. Instead of requiring the
files to be edited (and dirtying the git tree),
allow them to take command-line arguments.
Also adds better guidance for Mac OSX virtual
serial ports.
author | Joshua Flanagan <joshuaflanagan@gmail.com> |
---|---|
date | Tue, 10 Nov 2015 10:32:06 -0600 |
parents | 2e0074f75855 |
children | 3437e2246259 |
line wrap: on
line diff
--- a/Scan/STLcd/bitmap2Struct.py Mon Oct 26 18:06:40 2015 -0700 +++ b/Scan/STLcd/bitmap2Struct.py Tue Nov 10 10:32:06 2015 -0600 @@ -110,7 +110,10 @@ return display -filename = "ic_logo_lcd.bmp" +filename = sys.argv[1] +if filename is None: + print( "You must specify a bitmap filename. Try './bitmap2Struct.py ic_logo_lcd.bmp'" ) + sys.exit( 1 ) max_height = 32 max_width = 128 x_offset = 0