Added params utility function.
r1325 | ffr | 2006-11-30 08:25:07 +1100 (Thu, 30 Nov 2006) | 2 lines
This commit is contained in:
committed by
Douglas Clowes
parent
e19bfcdcfd
commit
2b3517ba59
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env tclsh
|
#!/usr/bin/env tclsh
|
||||||
|
|
||||||
# $Revision: 1.8 $
|
# $Revision: 1.9 $
|
||||||
# $Date: 2006-11-07 01:56:50 $
|
# $Date: 2006-11-29 21:25:07 $
|
||||||
# Author: Ferdi Franceschini (ffr@ansto.gov.au)
|
# Author: Ferdi Franceschini (ffr@ansto.gov.au)
|
||||||
# Last revision by $Author: ffr $
|
# Last revision by $Author: ffr $
|
||||||
|
|
||||||
@@ -14,6 +14,13 @@ if { $argc > 0 } {
|
|||||||
set configFileName [lindex $argv 0]
|
set configFileName [lindex $argv 0]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Use this to create an array of named parameters to initialise motors.
|
||||||
|
proc params {args} {
|
||||||
|
upvar 1 "" x;
|
||||||
|
if [info exists x] {unset x}
|
||||||
|
foreach {k v} $args {set x([string tolower $k]) $v}
|
||||||
|
}
|
||||||
|
|
||||||
namespace eval sics_config {
|
namespace eval sics_config {
|
||||||
proc loadConfig {fName} {
|
proc loadConfig {fName} {
|
||||||
variable ContList
|
variable ContList
|
||||||
|
|||||||
Reference in New Issue
Block a user