Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/navigate/controller/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,9 @@ def __init__(
#: bool: Flag for stopping acquisition.
self.stop_acquisition_flag = False

#: int: current image id in the buffer
self.current_image_id = -1

# Set view based on model.experiment
self.populate_experiment_setting(in_initialize=True)

Expand Down Expand Up @@ -928,6 +931,8 @@ def execute(self, command, *args):
while self.show_img_pipe.poll():
self.show_img_pipe.recv()

self.current_image_id = -1

elif command == "exit":
"""Exit the program.

Expand Down Expand Up @@ -1068,7 +1073,11 @@ def capture_image(self, command, mode, *args):
logger.info(f"Navigate Controller - Received Image: {image_id}")

if image_id == "stop":
self.current_image_id = -1
break

self.current_image_id = image_id

if not isinstance(image_id, int):
logger.debug(
f"Navigate Controller - Something wrong happened, stop the model!, "
Expand Down
Loading