Commit 3963ff68 authored by Emmanuel Papillon's avatar Emmanuel Papillon
Browse files

* counting preset for 3dxrd

parent 32b1c534
from bliss.config.static import get_config
from bliss.common.scans import DEFAULT_CHAIN
from bliss.scanning.chain import ChainPreset
def set_frelon_trigger():
config = get_config()
chaincfg = config.get("chain_3dxrd_trig")
def set_frelon_gate():
config = get_config()
chaincfg = config.get("chain_3dxrd_gate")
def set_frelon_soft():
class CountMuxPreset(ChainPreset):
def __init__(self, opmux):
self.opmux = opmux
def prepare(self, chain):
devused = [ for node in chain.nodes_list ]
frelons = [ name for name in devused if name.startswith("frelon") ]
frelon2mux = {
"frelon1": "CAM1",
"frelon2": "CAM2",
"frelon3": "CAM3",
shutter = "COUNTER"
if frelons:
shutter = frelon2mux.get(frelons[0], shutter)
self.opmux.switch("SHUTTER", shutter)
self.opmux.switch("TRIGGER_MODE", "COUNTER_CARD")
self.opmux.switch("CAM1", "ON")
self.opmux.switch("CAM2", "ON")
self.opmux.switch("CAM3", "ON")
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment