DAQ - jfjoch_viewer.py: fixed slot bug and changed load functions to use the http address instead of file path.
This commit is contained in:
@@ -32,16 +32,18 @@ class JFJochDBusClient(QObject):
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
#TODO tidy up load functions
|
||||
@Slot(str)
|
||||
def load_file(self, name: str):
|
||||
#path = "/sls/mx/data/" + name + "_master.h5"
|
||||
path=name
|
||||
if name.startswith("http://"):
|
||||
path = name
|
||||
else:
|
||||
path = "/sls/mx/data/" + name + "_master.h5"
|
||||
print(f"load {path}")
|
||||
if self._ensure_interface():
|
||||
reply = self.__interface.call("LoadFile", path, 0, 1)
|
||||
reply = self.__interface.call("LoadFile", "http://sls-gpu-001:8080", 0, 1)
|
||||
|
||||
@Slot(int)
|
||||
@Slot(str, int)
|
||||
def load_image(self, name: str, number: int):
|
||||
if name.startswith("http://"):
|
||||
path = name
|
||||
@@ -49,7 +51,7 @@ class JFJochDBusClient(QObject):
|
||||
path = "/sls/mx/data/" + name + "_master.h5"
|
||||
print(f"Load dataset: {name} image: {number}")
|
||||
if self._ensure_interface():
|
||||
reply = self.__interface.call("LoadFile", path, number, 1)
|
||||
reply = self.__interface.call("LoadFile", "http://sls-gpu-001:8080", number, 1)
|
||||
|
||||
@Slot()
|
||||
def load_online(self):
|
||||
|
||||
Reference in New Issue
Block a user