Remove superfluous trailing white space from TCL files

This commit is contained in:
Douglas Clowes
2014-05-16 12:30:51 +10:00
parent 89e4e37f9e
commit 92d3acb5d5
230 changed files with 1835 additions and 1835 deletions

View File

@@ -2,7 +2,7 @@
# Author: Ferdi Franceschini (ffr@ansto.gov.au)
# Creates a fake motion controller based on an
# Creates a fake motion controller based on an
# instrument configuration file.
# Usage ./cont.tcl -cont <cnum> -port <portname>
# where cnum is the controller number (1,2,3,4) and

View File

@@ -10,16 +10,16 @@ proc serverOpen {channel addr port} {
return;
}
# Reads a command from a DMC2280 client and then performs an appropriate
# Reads a command from a DMC2280 client and then performs an appropriate
# action depending on whether or not the command produces output or has
# been defined.
proc readLine {who channel} {
global didRead
global didRead
global B
if {[gets $channel line]<0} {
fileevent $channel readable {}
after idle "close $channel;set out 1"
} else {
} else {
puts "RECEIVED: $line"
foreach cmd [split $line ";"] {

View File

@@ -7,7 +7,7 @@
#parses CM exp, _CM<axis,num>, {TP,TD}<axis>, CM<axis>=exp, CM<axis>, CM
# axis=ABCDEFGH, num=01234567
proc parse {cmdst args} {
# CM exp, handles MG
# CM exp, handles MG
if {[string length $args] > 0} {return "$cmdst $args"}
# _CM<axis,num>, {TP,TD}<axis> get an axis property or position
@@ -17,18 +17,18 @@ proc parse {cmdst args} {
if {$num == 2 && [string first $cmd "TD TP"] != -1} {
return "dmget $cmd $axis";
}
# CM<axis>=exp
# Try
# Try
# set line "DPB=(_TPB - 7818915)*(25000/8192) + 0"
# parse $line
set cmdlst [split $cmdst =];
if {[llength $cmdlst] == 2} {
if {[llength $cmdlst] == 2} {
set num [scan [lindex $cmdlst 0] {%2s%1[ABCDEFGH0-7]} cmd axis];
return "dmset $cmd $axis [lindex $cmdlst 1]";
}
# CM<par>
# CM<par>
set num [scan $cmdst {%2s%1[ABCDEFGH0-7]} cmd par];
if {$num == 2} {return "dmcall $cmd $par"}
set num [scan $cmdst {_%2s%1[ABCDEFGH0-7]} cmd par];

View File

@@ -17,7 +17,7 @@ proc loadConfig {fName} {
if [info exists ContList] {unset ContList}
# Temporarily define unknown proc to skip undefined procs
rename ::unknown _unknown
proc ::unknown {args} {}
proc ::unknown {args} {}
if [catch {uplevel #0 source $fName} errMsg] {
rename ::unknown ""
rename _unknown ::unknown

View File

@@ -53,7 +53,7 @@ proc mkSimAxes {instrument} {
global IPtoContName motors ContList simConts;
puts [array get IPtoContName];
puts $motors;
foreach c $ContList {
set simFile($c) [open ${c}_sim.tcl w];
}

View File

@@ -151,21 +151,21 @@ proc nextstep {paxis step args} {
set currPos [expr ($axis(TP) - $axis(ABSHOME))/abs(double($axis(cntsperx)))]
if {$axis(ST) == 1} {
set axis(TS) 44; # Stopped, limit switches open
set axis(BG) 0; # motor has stopped
set axis(BG) 0; # motor has stopped
set axis(ST) 0; # make sure stop flag is unset
set axis(SC) 4; # motor stopped by stop command (ST)
set axis(ATLIM) false
set finished true
} elseif {$currPos >= $axis(UPLIM)} {
set axis(TS) 36; # Stopped on forward limit switch
set axis(BG) 0; # motor has stopped
set axis(BG) 0; # motor has stopped
set axis(ST) 0; # make sure stop flag is unset
set axis(SC) 2; # motor stopped by limit switch
set axis(ATLIM) upper
set finished true
} elseif {$currPos <= $axis(LOLIM)} {
set axis(TS) 40; # Stopped on reverse limit switch
set axis(BG) 0; # motor has stopped
set axis(BG) 0; # motor has stopped
set axis(ST) 0; # make sure stop flag is unset
set axis(SC) 3; # motor stopped by limit switch
set axis(ATLIM) lower
@@ -176,7 +176,7 @@ proc nextstep {paxis step args} {
# set axis(TP) [expr int(round($diff*$mult + $axis(TP)))];
# set axis(TD) [expr int($target)];
set axis(TS) 44; # Stopped, limit switches open
set axis(BG) 0; # motor has stopped
set axis(BG) 0; # motor has stopped
set axis(ST) 0; # make sure stop flag is unset
set axis(SC) 1; # motor stopped at commanded position
set axis(ATLIM) false