# HG changeset patch # User Jacob Alexander # Date 1447183443 28800 # Node ID 3437e2246259f2ba111d40a55df6cea6f788bab5 # Parent cba3cefc6e56813b1ec0d2ac21e3890e8d7eed23# Parent 63b1d003fd5007c1b32b656e0ab6ad4b6422fca6 Merge pull request #73 from joshuaflanagan/example_script_variables Stop requiring editing of example scripts diff -r cba3cefc6e56 -r 3437e2246259 Scan/ISSILed/exampleAPI.bash --- a/Scan/ISSILed/exampleAPI.bash Sun Nov 01 17:19:09 2015 -0800 +++ b/Scan/ISSILed/exampleAPI.bash Tue Nov 10 11:24:03 2015 -0800 @@ -3,9 +3,15 @@ # Virtual Serial Port API Example # Jacob Alexander 2015 +if [ $# -eq 0 ]; then + echo "You must specify your virtual serialport. (/dev/ttyACM0 on linux, /dev/cu.usbmodemXXXX on OSX)" + echo " ex: $0 /dev/ttyACM0" + exit 1 +fi # XXX Set this to match your virtual serialport -# TODO Show examples for Mac OSX and Cygwin/Windows -SERIALPORT=/dev/ttyACM0 +# TODO Show examples for Cygwin/Windows +# For Mac OSX it will be something like /dev/cu.usbmodem1413 (number may differ) +SERIALPORT=$1 # NOTE: Make sure you don't write too quickly to the serial port, it can get overwhelmed by a modern computer # Generally this just means commands will get ignored diff -r cba3cefc6e56 -r 3437e2246259 Scan/STLcd/bitmap2Struct.py --- a/Scan/STLcd/bitmap2Struct.py Sun Nov 01 17:19:09 2015 -0800 +++ b/Scan/STLcd/bitmap2Struct.py Tue Nov 10 11:24:03 2015 -0800 @@ -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 diff -r cba3cefc6e56 -r 3437e2246259 Scan/STLcd/exampleAPI.bash --- a/Scan/STLcd/exampleAPI.bash Sun Nov 01 17:19:09 2015 -0800 +++ b/Scan/STLcd/exampleAPI.bash Tue Nov 10 11:24:03 2015 -0800 @@ -3,9 +3,15 @@ # Virtual Serial Port API Example # Jacob Alexander 2015 +if [ $# -eq 0 ]; then + echo "You must specify your virtual serialport. (/dev/ttyACM0 on linux, /dev/cu.usbmodemXXXX on OSX)" + echo " ex: $0 /dev/ttyACM0" + exit 1 +fi # XXX Set this to match your virtual serialport -# TODO Show examples for Mac OSX and Cygwin/Windows -SERIALPORT=/dev/ttyACM0 +# TODO Show example for Cygwin/Windows +# For Mac OSX it will be something like /dev/cu.usbmodem1413 (number may differ) +SERIALPORT=$1 # NOTE: Make sure you don't write too quickly to the serial port, it can get overwhelmed by a modern computer # Generally this just means commands will get ignored