add FrappyManager.run + make work on linse-a

This commit is contained in:
2026-04-23 16:03:02 +02:00
parent 9682ccaa70
commit 7bb2c9907d
2 changed files with 8 additions and 1 deletions
+3 -1
View File
@@ -100,6 +100,8 @@ class Config:
configfile = Path('/sq_sw/linse/etc/linsetools.cfg')
self.sections = read_config(configfile)
instconfig = Path('/home/linse/.config/instrument.cfg')
if not instconfig.is_file():
instconfig = Path('/home/l_samenv/.config/instrument.cfg')
if instconfig.is_file():
self.instruments = read_config(instconfig)
else:
@@ -193,7 +195,7 @@ def wait_status(cl, service):
class MarcheControl:
port = 8124
otherarg = None
argmap = {k: 'action' for k in ('start', 'restart', 'stop', 'gui', 'cli', 'list', 'listcfg')}
argmap = {k: 'action' for k in ('start', 'restart', 'stop', 'gui', 'run', 'cli', 'list', 'listcfg')}
def __init__(self, instrument=None, host='localhost', port=None, user=None, config=None):
self.config = config or Config()
+5
View File
@@ -271,6 +271,9 @@ class FrappyControl(MarcheControl):
if ambiguous:
prt(f'{gap} ! {len(ambiguous)} ambiguous mappings sea -> frappy')
def run(self, cfg):
os.system(f'/sq_sw/linse/bin/frappy-server sinq {cfg}')
def do(self, action=None, service=None, cfg=None):
if action == 'start':
self.add_frappy_service(service, cfg, None)
@@ -287,5 +290,7 @@ class FrappyControl(MarcheControl):
self.gui()
elif action in ('cli', None):
self.cli()
elif action in ('run', None):
self.run(cfg)
else:
raise ArgError(f'unknown action {action!r}')