code cleanup

r2960 | dcl | 2010-06-25 15:06:37 +1000 (Fri, 25 Jun 2010) | 2 lines
This commit is contained in:
Douglas Clowes
2010-06-25 15:06:37 +10:00
parent 687ed01c01
commit cebd4d5600
3 changed files with 24 additions and 23 deletions

View File

@@ -69,7 +69,7 @@ debug_log "checktol $tc_root $currtime $timecheck"
return 0
} else {
set timeout [hval $tc_root/tolerance/settletime]
if {[expr $currtime - $timecheck] > $timeout} {
if { ($currtime - $timecheck) > $timeout } {
hset $tc_root/emon/isintol 1
}
return 1
@@ -103,8 +103,8 @@ debug_log "rdState $tc_root: result=$data"
if {$my_driving > 0} {
set temp [hval $tc_root/sensor/value]
set tol [hval $tc_root/tolerance]
set lotemp [expr $tgt - $tol]
set hitemp [expr $tgt + $tol]
set lotemp [expr {$tgt - $tol}]
set hitemp [expr {$tgt + $tol}]
debug_log "rdState driving $tc_root until $data in ($lotemp, $hitemp)"
if {$data < $lotemp} {
} elseif {$data > $hitemp} {
@@ -138,7 +138,7 @@ debug_log "rdState driving $tc_root until $data in ($lotemp, $hitemp)"
# NOTE: The drive adapter initially sets the writestatus to "start" and will
# only call this when writestatus!="start"
proc drivestatus {tc_root} {
if [sct driving] {
if {[sct driving]} {
return busy
} else {
return idle
@@ -153,7 +153,7 @@ debug_log "halt $tc_root"
}
proc mk_sct_eurotherm_et2000 {sct_controller klass tempobj dev_id tol} {
if [ catch {
if {[ catch {
set ns ::scobj::et2000
MakeSICSObj $tempobj SCT_OBJECT
@@ -321,7 +321,7 @@ debug_log "halt $tc_root"
if {[SplitReply [environment_simulation]]=="false"} {
ansto_makesctdrive ${tempobj}_driveable $scobj_hpath/setpoint $scobj_hpath/sensor/value $sct_controller
}
} message ] {
} message ]} {
return -code error $message
}
}