diff --git a/site_ansto/instrument/util/gen_sct.py b/site_ansto/instrument/util/gen_sct.py index 97dbc0bb..44faf8d3 100755 --- a/site_ansto/instrument/util/gen_sct.py +++ b/site_ansto/instrument/util/gen_sct.py @@ -1310,7 +1310,7 @@ def put_checkstatus_function(MyDriver, func): txt += [' set sp "[sct target]"'] txt += [' if {[hpropexists [sct] simulated] && [sct simulated] == "true"} {'] txt += [' set pv "${sp}"'] - txt += [' hset ${tc_root}/[sct driveable] ${sp}'] + txt += [' hupdateif ${tc_root}/[sct driveable] ${sp}'] txt += [' }'] txt += [' set pv "[hval ${tc_root}/[sct driveable]]"'] txt += [' }'] @@ -1396,7 +1396,7 @@ def put_pid_function(MyDriver, func): def put_var(MyDriver, MyGroup, MyVar): readable_or_writeable = False - txt = [' # Start of var: ' + MyVar['name']] + txt = [] postfix = [] if MyGroup['name']: nodename = MyGroup['path'] + '/' + MyVar['name'] @@ -1553,10 +1553,9 @@ def put_group(MyDriver, MyGroup): dfr = [] if MyGroup['name']: txt += [''] - txt += [' # Start of named group: ' + MyGroup['path']] txt += [' hfactory ${scobj_hpath}/%s plain spy none' % MyGroup['path']] else: - txt += [' # Start of unnamed group'] + pass for var in sorted(MyGroup['Vars']): txt += [''] @@ -1569,13 +1568,11 @@ def put_group(MyDriver, MyGroup): if 'GroupProperty' in MyGroup: for key in sorted(MyGroup['GroupProperty']): txt += [' hsetprop ${scobj_hpath}/%s %s "%s"' % (MyGroup['path'], key, MyGroup['GroupProperty'][key])] - txt += [' # End of named group: ' + MyGroup['path']] else: if 'GroupProperty' in MyGroup: txt += [''] for key in sorted(MyGroup['GroupProperty']): txt += [' hsetprop ${scobj_hpath} %s "%s"' % (key, MyGroup['GroupProperty'][key])] - txt += [' # End of unnamed group'] for grp in sorted(MyGroup['Groups']): txt += put_group(MyDriver, MyGroup['Groups'][grp]) @@ -2087,7 +2084,7 @@ def main(): parser.add_argument("-m", "--move", help="generate move commands", action="store_true") parser.add_argument("--sct", help="where to put the sct in the filename", - choices=["before", "after"], default="after") + choices=["before", "after"], default="before") parser.add_argument("-v", "--verbose", help="verbose output", action="store_true") parser.add_argument("driver_source", help="driver source file", nargs="*")