- Fixed a bug in conman.c which could cause a core dump when terminating
a connection during an active run. - Added an additional output mode for the connection in order to support the batch run editor. - Made clientput send everything with eWarning mode in order to support the batch run editor. - Added a better NetReadTillTerm - Fixed a problem in synchronize.c - Fixed an issue with reading empty line on normal connection sockets. - Added a psi scan mode to mesure.c for TRICS - Made motor print warnings when trying to reposition. - Fixed abug in hkl.c which cause wrong signs. SKIPPED: psi/el734driv.c psi/el734hp.c psi/el737driv.c psi/el737hpdriv.c psi/nextrics.c psi/nxamor.c psi/psi.c psi/slsmagnet.c psi/swmotor2.c psi/tasscan.c psi/tasutil.c
This commit is contained in:
@@ -32,6 +32,7 @@ proc writeFloatVar {alias var} {
|
||||
clientput [format "ERROR: failed to read %s, %s" $var $val]
|
||||
return
|
||||
} else {
|
||||
set val [string trim $val]
|
||||
set ret [catch {expr $val * 1.0} val]
|
||||
if { $ret == 0} {
|
||||
nxscript putfloat $alias [expr $val * 1.0 ]
|
||||
@@ -40,14 +41,36 @@ proc writeFloatVar {alias var} {
|
||||
}
|
||||
}
|
||||
}
|
||||
#==========================================================================
|
||||
proc writeIntVar {alias var} {
|
||||
set ret [catch {set val [SplitReply [$var]]} val]
|
||||
if { $ret != 0} {
|
||||
clientput [format "ERROR: failed to read %s, %s" $var $val]
|
||||
return
|
||||
} else {
|
||||
set val [string trim $val]
|
||||
set ret [catch {expr $val * 1.0} val]
|
||||
if { $ret == 0} {
|
||||
nxscript putint $alias [expr int($val * 1.0) ]
|
||||
} else {
|
||||
clientput "ERROR: bad value $val when reading $var"
|
||||
}
|
||||
}
|
||||
}
|
||||
#=========================================================================
|
||||
proc writeTextVar {alias var} {
|
||||
set ret [catch {set val [SplitReply [$var]]} val]
|
||||
set ret [catch {$var} val]
|
||||
if { $ret != 0} {
|
||||
clientput [format "ERROR: failed to read %s" $var]
|
||||
return
|
||||
} else {
|
||||
nxscript puttext $alias $val
|
||||
set index [string first = $val]
|
||||
if {$index >= 0} {
|
||||
set txt [string trim [string range $val [expr $index + 1] end]]
|
||||
nxscript puttext $alias $txt
|
||||
} else {
|
||||
clientput [format "ERROR: failed to read %s" $var]
|
||||
}
|
||||
}
|
||||
}
|
||||
#========================================================================
|
||||
@@ -57,7 +80,7 @@ proc writeTextAttribute {attName var} {
|
||||
clientput [format "ERROR: failed to read %s" $var]
|
||||
return
|
||||
} else {
|
||||
nxscript putglobal $attName $val
|
||||
nxscript putglobal $attName [string trim $val]
|
||||
}
|
||||
}
|
||||
#=======================================================================
|
||||
|
||||
Reference in New Issue
Block a user