From 6c6ba7de86a568f5c887f8d4ef54d8268c00ff51 Mon Sep 17 00:00:00 2001 From: Ferdi Franceschini Date: Mon, 19 Jul 2010 17:38:02 +1000 Subject: [PATCH] sct_oxford_ips.tcl Set the "setpoint" type to drivable for GumTree and clear the "geterror" property when we get a new reading. r2981 | ffr | 2010-07-19 17:38:02 +1000 (Mon, 19 Jul 2010) | 3 lines --- .../config/environment/magneticField/sct_oxford_ips.tcl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/site_ansto/instrument/config/environment/magneticField/sct_oxford_ips.tcl b/site_ansto/instrument/config/environment/magneticField/sct_oxford_ips.tcl index f3817e3d..908f3ec8 100644 --- a/site_ansto/instrument/config/environment/magneticField/sct_oxford_ips.tcl +++ b/site_ansto/instrument/config/environment/magneticField/sct_oxford_ips.tcl @@ -15,6 +15,9 @@ namespace eval ::scobj::ips120 { # issue a command to read a register and expect a value response proc getValue {tc_root nextState cmd} { + if { [hpropexists [sct] geterror] } { + hdelprop [sct] geterror + } debug_log "getValue $cmd sct=[sct] root=$tc_root nextState=$nextState" sct send "@2$cmd" return $nextState @@ -138,6 +141,9 @@ debug_log "rdValue new data for $tc_root [sct] result=$data" # values in the controller in a sequence intended to transition the controller # between states. proc getState {tc_root nextState cmd} { + if { [hpropexists [sct] geterror] } { + hdelprop [sct] geterror + } debug_log "getState $tc_root $nextState $cmd sct=[sct]" if {[ catch { set my_state "[SplitReply [hgetprop $tc_root/ips120_state my_state]]" @@ -719,6 +725,7 @@ debug_log "Registering node $nodeName for write callback" hsetprop $scobj_hpath privilege spy ::scobj::hinitprops $tempobj setpoint if {[SplitReply [environment_simulation]]=="false"} { + hsetprop $scobj_hpath/setpoint type drivable ansto_makesctdrive ${tempobj}_driveable $scobj_hpath/setpoint $scobj_hpath/sensor/value $sct_controller } } catch_message ]