FIX: Create driver interface for each syringe pump on Platypus

This commit is contained in:
Ferdi Franceschini
2013-11-23 19:28:32 +11:00
committed by Ferdi Franceschini
parent 52f28117ef
commit 2cf513c4bb

View File

@@ -468,7 +468,7 @@ sct print "halt $tc_root"
proc createNode {scobj_hpath sct_controller cmdGroup varName readable writable nexus gumtree\
drivable dataType permission rdCmd rdFunc wrCmd\
wrFunc allowedValues klass} {
debug_log "createNode cmdGroup = $cmdGroup"
set catch_status [ catch {
set ns "[namespace current]"
set nodeName "$scobj_hpath/$cmdGroup/$varName"
@@ -568,11 +568,11 @@ debug_log "Registering node $nodeName for write callback"
}
set num_pumps 2
for {set i 0} { i < $num_pumps } { incr i } {
for {set i 0} { $i < $num_pumps } { incr i } {
set cmdGroup "Pump[set i]"
hfactory $scobj_hpath/[set cmdGroup] plain spy none
foreach {cmdGroup varName readable writable nexus gumtree drivable dataType permission rdCmd rdFunc wrCmd wrFunc allowedValues} $deviceCommand {
createNode $scobj_hpath $sct_controller $cmdGroup $varName $readable $writable $nexus $gumtree $drivable $dataType $permission $rdCmd $rdFunc $wrCmd $wrFunc $allowedValues $klass
createNode $scobj_hpath $sct_controller ${cmdGroup}$i $varName $readable $writable $nexus $gumtree $drivable $dataType $permission $rdCmd $rdFunc $wrCmd $wrFunc $allowedValues $klass
}
}