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.
This commit is contained in:
Joshua Flanagan 2015-11-10 10:32:06 -06:00
parent 6dfeffd9ca
commit cd01bfe0ed
3 changed files with 20 additions and 5 deletions

View file

@ -110,7 +110,10 @@ class STLcdGraphic:
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