Mercurial > louis > kiibohd-controller
comparison 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 |
comparison
equal
deleted
inserted
replaced
396:9ec758fc2e1f | 398:63b1d003fd50 |
---|---|
108 display += "+\n" | 108 display += "+\n" |
109 | 109 |
110 return display | 110 return display |
111 | 111 |
112 | 112 |
113 filename = "ic_logo_lcd.bmp" | 113 filename = sys.argv[1] |
114 if filename is None: | |
115 print( "You must specify a bitmap filename. Try './bitmap2Struct.py ic_logo_lcd.bmp'" ) | |
116 sys.exit( 1 ) | |
114 max_height = 32 | 117 max_height = 32 |
115 max_width = 128 | 118 max_width = 128 |
116 x_offset = 0 | 119 x_offset = 0 |
117 y_offset = 0 | 120 y_offset = 0 |
118 output_image = STLcdGraphic( max_height, max_width ) | 121 output_image = STLcdGraphic( max_height, max_width ) |