This commit is contained in:
gac-x06da
2025-03-21 09:57:25 +01:00
parent 4091f11b0a
commit d53ec4c14c
+23 -4
View File
@@ -4,9 +4,23 @@ from bec_widgets.cli.rpc.rpc_base import RPCResponseTimeoutError
class PlotUpdate(AutoUpdates):
create_default_dock = True
dock_name = "default"
enabled = True
_scan_msg = None
# def __init__(self, gui: BECDockArea):
# super().__init__(gui)
def start_default_dock(self):
"""
Create a default dock for the auto updates.
"""
self.dock_name = "default_figure"
self._default_dock = self.gui.add_dock(self.dock_name)
self._default_dock.add_widget("BECWaveformWidget")
self._default_fig = self._default_dock.widget_list[0]
def do_update(self, msg):
"""Save the original scan message for future use"""
self._scan_msg = msg
@@ -41,12 +55,17 @@ class PlotUpdate(AutoUpdates):
if not det:
return
# dck1 = self._default_dock
# dck
plt1 = self.get_default_figure()
# clear_all() will throw RPCResponseTimeoutError
try:
plt1.clear_all()
except RPCResponseTimeoutError:
pass
# try:
# plt1.clear_all()
# except RPCResponseTimeoutError:
# pass
print(type(plt1), plt1)
# plot() will throw RPCResponseTimeoutError
try: