Monorepo for Aesthetic.Computer
aesthetic.computer
1function hp7585bplot
2 if test (count $argv) -lt 1
3 echo "usage: hp7585bplot file.hpgl"
4 return 1
5 end
6
7 if not set -q HP7585B_TTY
8 echo "HP7585B_TTY not set. e.g. set -Ux HP7585B_TTY /dev/cu.usbserial-XXXX"
9 return 1
10 end
11
12 if not test -e $HP7585B_TTY
13 echo "device $HP7585B_TTY does not exist"
14 return 1
15 end
16
17 # 9600 8N1, Xon/Xoff. -clocal so flow control is honored on macOS.
18 stty -f $HP7585B_TTY 9600 cs8 -cstopb -parenb -clocal ixon ixoff
19
20 cat $argv[1] > $HP7585B_TTY
21end