From 6b1a192af6fea52292c3948ddeab2d4c92abbced Mon Sep 17 00:00:00 2001 From: Ferdi Franceschini Date: Tue, 3 Feb 2015 15:51:36 +1100 Subject: [PATCH] Fix updating parameters when a value changes. --- .../instrument/bilby/config/chopper/astrium_chopper.sct | 7 ++++--- .../bilby/config/chopper/astrium_chopper_sct.tcl | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/site_ansto/instrument/bilby/config/chopper/astrium_chopper.sct b/site_ansto/instrument/bilby/config/chopper/astrium_chopper.sct index 64e4bd47..388a3467 100644 --- a/site_ansto/instrument/bilby/config/chopper/astrium_chopper.sct +++ b/site_ansto/instrument/bilby/config/chopper/astrium_chopper.sct @@ -95,14 +95,15 @@ driver astrium_chopper = { "ASPEED" { if [string is double "${rhs}"] { set freq [expr "${rhs}" / 60.0] - if { "[hval ${base}/frequency]" != "${freq}" } { + if { "[hval ${base}/${lhs}]" != "${rhs}" } { + hset ${base}/${lhs} "${rhs}" hset ${base}/frequency ${freq} } } } "RSPEED" - "APHASE" - "RPHASE" - "MASTER" { - if { "[hval ${base}/${node}]" != "${rhs}" } { - hset ${base}/${node} "${rhs}" + if { "[hval ${base}/${lhs}]" != "${rhs}" } { + hset ${base}/${lhs} "${rhs}" } } } diff --git a/site_ansto/instrument/bilby/config/chopper/astrium_chopper_sct.tcl b/site_ansto/instrument/bilby/config/chopper/astrium_chopper_sct.tcl index 8d8c4d2b..67b6141f 100644 --- a/site_ansto/instrument/bilby/config/chopper/astrium_chopper_sct.tcl +++ b/site_ansto/instrument/bilby/config/chopper/astrium_chopper_sct.tcl @@ -181,14 +181,15 @@ proc ::scobj::astrium_chopper::readState {tc_root} { "ASPEED" { if [string is double "${rhs}"] { set freq [expr "${rhs}" / 60.0] - if { "[hval ${base}/frequency]" != "${freq}" } { + if { "[hval ${base}/${lhs}]" != "${rhs}" } { + hset ${base}/${lhs} "${rhs}" hset ${base}/frequency ${freq} } } } "RSPEED" - "APHASE" - "RPHASE" - "MASTER" { - if { "[hval ${base}/${node}]" != "${rhs}" } { - hset ${base}/${node} "${rhs}" + if { "[hval ${base}/${lhs}]" != "${rhs}" } { + hset ${base}/${lhs} "${rhs}" } } }