chiark / gitweb /
permit 9804 before no 9804 in goto start posn
authorian <ian>
Fri, 25 Jan 2008 23:31:22 +0000 (23:31 +0000)
committerian <ian>
Fri, 25 Jan 2008 23:31:22 +0000 (23:31 +0000)
hostside/measure-speeds

index cf3b43448b3411d5cce1ce4f8d0bf1ac8d385b75..a0355c9310cf601080b7153215990649f0f5ceaf 100755 (executable)
@@ -4,6 +4,9 @@
 #  ./measure-speeds /dev/ttyUSB1 2 0 `seq 1 126` |tee santafe.speeds
 #                                  ^reverse
 
+# debugging:
+# ./measure-speeds /dev/ttyUSB0 1 1 `seq 1 126` 2>&1 | perl -pe '$|=1; s/\r/\n/g' | 3<&0 tclsh8.3 <(echo 'set f [open /dev/fd/3]; proc cm {} { clock clicks -milliseconds }; set z [cm]; while {[gets $f l]>=0} { puts [format "%-10s %s" [expr {[cm]-$z}] $l] }') 
+
 load chiark_tcl_hbytes-1.so
 
 proc debug_r {m} { puts -nonewline stderr "$m\r" }
@@ -185,7 +188,7 @@ proc goto-slow-start-position {speed} {
        run-until -100 {9804 980a}
        set last_fast_speed -1
     }
-    run-until -40 9802
+    run-until -40 {9802 9804}
     run-until-not -40 9804 600
     instruct-speed-for -40 [expr {$speed*$speed}]
     instruct-stop-for 1000