sct_oxford_itc.tcl

Revert changes to drving state.
r3136 | ffr | 2011-05-19 08:39:00 +1000 (Thu, 19 May 2011) | 2 lines
This commit is contained in:
Ferdi Franceschini
2011-05-19 08:39:00 +10:00
committed by Douglas Clowes
parent 12b524cfbb
commit 579fd8ebd0

View File

@@ -40,8 +40,11 @@ debug_log "setPoint $tc_root $nextState $cmd sct=[sct]"
set par "[sct target]"
}
hset $tc_root/status "busy"
if {[sct writestatus] == "start"} {
# Called by drive adapter
hsetprop $tc_root/setpoint driving 1
}
sct send "@1$cmd$par"
sct setpoint_pending 0
debug_log "setPoint $cmd$par"
return $nextState
}
@@ -256,7 +259,7 @@ debug_log "rdState $tc_root: target=$tgt"
set tgt [SplitReply [hgetprop $tc_root/setpoint target]]
debug_log "rdState $tc_root: initialised target to: target=$tgt"
}
if {$my_driving > 0 && [sct setpoint_pending] == 0} {
if {$my_driving > 0} {
if {[hval $tc_root/control_sensor] == "3"} {
set temp [hval $tc_root/sensor3/value]
} elseif {[hval $tc_root/control_sensor] == "2"} {
@@ -296,10 +299,8 @@ debug_log "rdState returns: $nextState"
set lolimit [hval $tc_root/lowerlimit]
set hilimit [hval $tc_root/upperlimit]
if {$setpoint < $lolimit || $setpoint > $hilimit} {
sct driving 0
error "setpoint violates limits"
}
sct setpoint_pending 1
return OK
}
@@ -340,7 +341,6 @@ debug_log "halt $tc_root"
hsetprop $scobj_hpath/setpoint noResponse ${ns}::noResponse
hsetprop $scobj_hpath/setpoint oldval UNKNOWN
hsetprop $scobj_hpath/setpoint driving 0
hsetprop $scobj_hpath/setpoint setpoint_pending 0
hsetprop $scobj_hpath/setpoint writestatus UNKNOWN
# Drive adapter interface
hsetprop $scobj_hpath/setpoint checklimits ${ns}::check $scobj_hpath