Skip to content

Commit eb22cf5

Browse files
Merge pull request #1001 from annie-xd-wang/support-plugin-navigate-remotely
support plugin: navigate-remotely
2 parents 9120c03 + 7537127 commit eb22cf5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/navigate/controller/controller.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,9 @@ def __init__(
303303
#: bool: Flag for stopping acquisition.
304304
self.stop_acquisition_flag = False
305305

306+
#: int: current image id in the buffer
307+
self.current_image_id = -1
308+
306309
# Set view based on model.experiment
307310
self.populate_experiment_setting(in_initialize=True)
308311

@@ -928,6 +931,8 @@ def execute(self, command, *args):
928931
while self.show_img_pipe.poll():
929932
self.show_img_pipe.recv()
930933

934+
self.current_image_id = -1
935+
931936
elif command == "exit":
932937
"""Exit the program.
933938
@@ -1068,7 +1073,11 @@ def capture_image(self, command, mode, *args):
10681073
logger.info(f"Navigate Controller - Received Image: {image_id}")
10691074

10701075
if image_id == "stop":
1076+
self.current_image_id = -1
10711077
break
1078+
1079+
self.current_image_id = image_id
1080+
10721081
if not isinstance(image_id, int):
10731082
logger.debug(
10741083
f"Navigate Controller - Something wrong happened, stop the model!, "

0 commit comments

Comments
 (0)