Wombat and Echidna use fileeval and cfPath to load configs for the
eulerian cradle. r3533 | ffr | 2012-04-19 10:27:08 +1000 (Thu, 19 Apr 2012) | 3 lines
This commit is contained in:
committed by
Douglas Clowes
parent
17c5d43030
commit
1cddcfd82d
@@ -19,11 +19,18 @@ puts "INSTNAME is the instrument name (eg wombat, echidna)"
|
|||||||
}
|
}
|
||||||
|
|
||||||
source loadConfig.tcl
|
source loadConfig.tcl
|
||||||
|
proc fileeval {args} {
|
||||||
|
if [catch {uplevel #0 source $args} errMsg] {
|
||||||
|
error $errMsg
|
||||||
|
}
|
||||||
|
}
|
||||||
# This implementation of the "Motor" command stores the
|
# This implementation of the "Motor" command stores the
|
||||||
# configured motor parameters in an array named
|
# configured motor parameters in an array named
|
||||||
# after the motor.
|
# after the motor.
|
||||||
proc Motor {name type par} {
|
proc Motor {name type par} {
|
||||||
|
if {$type != "DMC2280"} {
|
||||||
|
return
|
||||||
|
}
|
||||||
global motors;
|
global motors;
|
||||||
upvar #0 $par arr
|
upvar #0 $par arr
|
||||||
upvar #0 $name param_arr
|
upvar #0 $name param_arr
|
||||||
@@ -90,6 +97,7 @@ proc main {instrument sicspath args} {
|
|||||||
|
|
||||||
if {$tcl_interactive==0} {
|
if {$tcl_interactive==0} {
|
||||||
puts "arguments($argc) = $argv"
|
puts "arguments($argc) = $argv"
|
||||||
|
set cfPath(motors) "config/motors"
|
||||||
switch $argc {
|
switch $argc {
|
||||||
1 { main $argv ../sics/server config/motors/motor_configuration.tcl }
|
1 { main $argv ../sics/server config/motors/motor_configuration.tcl }
|
||||||
2 { main [lindex $argv 0] [lindex $argv 1] config/motors/motor_configuration.tcl }
|
2 { main [lindex $argv 0] [lindex $argv 1] config/motors/motor_configuration.tcl }
|
||||||
|
|||||||
Reference in New Issue
Block a user