chiark / gitweb /
can reprogram santafe
[trains.git] / hostside / fun-randmore
index 4f318f1ee018b709ddccfe4ec4799277b4c45da1..49971d861117ae1cba63fc9d33dcd9373949c8d6 100755 (executable)
@@ -1,5 +1,6 @@
 #!/bin/sh
 set -e
+s=$1
 while true; do
        echo
        which=$(hexdump </dev/urandom -n1 -e '"%d"')
@@ -10,12 +11,12 @@ while true; do
                b2=$(hexdump </dev/urandom -n1 -e '"%d"')
                dirn=$(($b2 / 128))
                echo which=$which b1=$b1 speed=$speed b2=$b2 dirn=$dirn
-               ./hostside-old -s/dev/ttya0 speed126 2 $speed $dirn
+               ./hostside-old -s$s speed126 2 $speed $dirn
        fi
        if [ $which -lt 128 ]; then
                value=$(( $which * 16 ))
                printf "which=%s value=%s value=0x%x\n" $which $value $value
-               ./hostside-old -s/dev/ttya0 funcs5to8 2 $value
+               ./hostside-old -s$s funcs5to8 2 $value
        fi
        delay=$(hexdump </dev/urandom -n1 -e '"%d"')
        delayv=$(( $delay / 2 + 10 ))