This commit is contained in:
gobbo_a
2025-12-15 16:53:16 +01:00
parent 1fa968a960
commit 4f6a49c538
37 changed files with 1214 additions and 518 deletions
+26
View File
@@ -420,3 +420,29 @@ def set_wire_scan_range(wsc, wire, start, end):
caput((wsc + ":" + sel[wire] +"_START_SP"), start)
caput((wsc + ":" + sel[wire] +"_END_SP"), end)
def disable_blms(wire_scanner, debug=True):
init_state = {}
blms = WSC_data.get(wire_scanner, {}).get("BLM", [])
for blm in blms:
init_state[blm] = is_blm_enabled(blm)
for blm, state in init_state.items():
if state != (False, False):
if debug:
print "Disable: ", blm, state
else:
set_blm_enabled(False, blm)
return init_state
def reenable_blms(init_state, debug=True):
for blm, state in init_state.items():
if state != (False, False):
if debug:
print "Restore: ", blm, state
else:
set_blm_enabled(state, blm)