Merged 2.4 branch

r2828 | ffr | 2009-11-25 09:56:49 +1100 (Wed, 25 Nov 2009) | 2 lines
This commit is contained in:
Ferdi Franceschini
2009-11-25 09:56:49 +11:00
committed by Douglas Clowes
parent c58ee9fbcb
commit 2ec6505ef8
71 changed files with 2237 additions and 1528 deletions

View File

@@ -130,7 +130,7 @@ namespace eval ::scobj::positmotor {
# }
sct oldval $data
sct update $data
if {$data > 0} {
if {$data > 0 && [string is integer $data]} {
if {$calc_instpar == "@none"} {
hset $path/$staticpar $posit_label($motor,$data)
} else {
@@ -155,15 +155,18 @@ namespace eval ::scobj::positmotor {
set val [pos2val [sct target] $motor]
hset $path/status BUSY
run $motor $val
$sct_controller poll $path 1
# $sct_controller poll $path 1
} errmsg ] {
error $errmsg
return idle
return noResponse
} else {
return idle
return noResponse
}
}
proc noResponse {} {
return idle
}
# TODO Check thread 0 and motion control disabled?
proc check_motor {} {
@@ -217,6 +220,7 @@ namespace eval ::scobj::positmotor {
hsetprop $scobjPath/$pindex read ${ns}::rd_index $pindex $motor
hsetprop $scobjPath/$pindex state_reading_index ${ns}::state_reading_index $scobjPath $pindex $motor $staticpar $calc_instpar
hsetprop $scobjPath/$pindex write ${ns}::w_index $sct_controller $scobjPath $pindex $motor
hsetprop $scobjPath/$pindex noResponse ${ns}::noResponse
hsetprop $scobjPath/$pindex check ${ns}::check_motor
hsetprop $scobjPath/$pindex oldval UNKNOWN
@@ -239,7 +243,7 @@ namespace eval ::scobj::positmotor {
proc ${motor}_MOTEND {} [subst -nocommands {
if { [hval $scobjPath/status] == "BUSY"} {
$sct_controller poll $scobjPath/$pindex 5
# $sct_controller poll $scobjPath/$pindex 5
hset $scobjPath/status STOPPING
}
}]
@@ -247,7 +251,7 @@ namespace eval ::scobj::positmotor {
scriptcallback connect $motor MOTEND ${ns}::${motor}_MOTEND
$sct_controller poll $scobjPath/$pindex
$sct_controller poll $scobjPath/$pindex 2
$sct_controller write $scobjPath/$pindex
sicslist setatt $scobjName long_name $scobjName