SICS-770 Fixed SICS reports 'bad status code' when scanning the schp motor
This commit is contained in:
@ -423,13 +423,16 @@ namespace eval ::chopper {
|
||||
set catch_status [ catch {
|
||||
if [hgetpropval $hpath/$node abort] {
|
||||
hsetprop $hpath/$node abort 0
|
||||
clientput "ERROR: User requested stop. Aborting operation"
|
||||
set errStr "ERROR: User requested stop. Aborting operation"
|
||||
clientput $errStr
|
||||
hsetprop $hpath/$node errmsg $errStr
|
||||
return $SCode(HWFault)
|
||||
}
|
||||
set devErr [hval $hpath/$node/control/device_error]
|
||||
if {$devErr != ""} {
|
||||
clientput "ERROR: Drive request failed. Aborting operation"
|
||||
clientput $devErr
|
||||
set errStr "ERROR: Drive request failed. Aborting operation: device_error = $devErr"
|
||||
clientput $errStr
|
||||
hsetprop $hpath/$node errmsg $errStr
|
||||
return $SCode(HWFault)
|
||||
}
|
||||
if [hpropexists $hpath geterror] {
|
||||
@ -458,6 +461,8 @@ namespace eval ::chopper {
|
||||
return $SCode(HWBusy)
|
||||
} elseif {[expr $readtime - $timecheck] > $timeout} {
|
||||
return $SCode(HWIdle)
|
||||
} else {
|
||||
return $SCode(HWBusy)
|
||||
}
|
||||
} else {
|
||||
if {$timecheck != -1} {
|
||||
@ -498,6 +503,9 @@ namespace eval ::chopper {
|
||||
proc imot_PhRun {hpath node addr name target} {
|
||||
global SCode
|
||||
|
||||
if {[hval $hpath/$node/control/device_error] != ""} {
|
||||
hset $hpath/$node/control/device_error ""
|
||||
}
|
||||
hset $hpath/$node/control/set_ref_delay $target
|
||||
hsetprop $hpath/$node/control timecheck -1
|
||||
set readtime [hgetpropval $hpath read_time]
|
||||
|
Reference in New Issue
Block a user