moving config dialog to app_config

This commit is contained in:
2022-08-22 14:27:09 +02:00
parent 28c94dd297
commit d8b34a3f99
3 changed files with 213 additions and 218 deletions

View File

@@ -17,9 +17,7 @@ class Deltatau:
def __init__(self):
app=QApplication.instance()
cfg=app._cfg
# cfg.setValue(AppCfg.DELTATAU_HOST, 'SAR-CPPM-EXPMX1')
cfg.setValue(AppCfg.DELTATAU_HOST, 'localhost:10001:10002')
host=cfg.value(AppCfg.DELTATAU_HOST)
host=cfg.value(AppCfg.DT_HOST)
hpp=host.split(':')
param={'host':hpp[0]}
@@ -28,7 +26,12 @@ class Deltatau:
if len(hpp)>2:
param['fast_gather_port']=int(hpp[2])
_log.info(' -> ssh-tunneling PPComm({host}:{port} {host}:{fast_gather_port})'.format(**param))
self._comm=comm=PPComm(**param)
self._gather=gather=Gather(comm)
try:
self._comm=comm=PPComm(**param)
self._gather=gather=Gather(comm)
except AttributeError as e:
_log.critical('can not connect to deltatau')
return
verbose=0xff
self._shapepath=sp=shapepath.ShapePath(comm, gather, verbose, sync_mode=1, sync_flag=3)