chiark / gitweb /
more correct when off
authorian <ian>
Thu, 5 Jan 2006 01:03:17 +0000 (01:03 +0000)
committerian <ian>
Thu, 5 Jan 2006 01:03:17 +0000 (01:03 +0000)
hostside/gui-displayer
hostside/stopgap-controller

index 93320b7da57c7cfade46beda9ecaa5acd5b567b1..9086155edabfef342dffcdfdda488101b432ca07 100755 (executable)
@@ -93,8 +93,7 @@ proc update_seg {segname} {
 #puts stderr "update_seg $segname"
 
     if {!$power} {
-       setsegbyname $segname off
-       return
+        set command off
     } else {
        set command [expr {$d ? "det" : "on"}]
        if {$r} { set command "i$command" }
@@ -105,7 +104,7 @@ proc update_seg {segname} {
     foreach mov $movs {
 #puts stderr "update_seg $segname mov $mov"
        upvar #0 movpos($mov) mp
-       if {[string length $mp]} {
+       if {[string length $mp] && [string compare off $command]} {
            setsegbyname $mov $command $mp
        } else {
            setsegbyname $mov $command
index dd955a4497cb241a6ed88cb44c7a0483e32961b2..ce969a3e6d306ad3f4dac137faf4273f6e78ffbc 100755 (executable)
@@ -5,6 +5,7 @@
 set testonly 0
 #set testonly 1
 set port /dev/ttya0
+#set port /dev/ttyS0
 
 set ch(funcsevery) 10
 set ch(speeddirnevery) 30