diff --git a/src/view/acquisition_view.py b/src/view/acquisition_view.py index d953c38..ead41fe 100644 --- a/src/view/acquisition_view.py +++ b/src/view/acquisition_view.py @@ -155,13 +155,12 @@ def start_acquisition(self) -> None: self.update_tiles() if self.instrument_view.grab_frames_worker.is_running: # stop livestream if running - self.instrument_view.dismantle_live() + self.instrument_view.grab_frames_worker.quit() # write correct daq values if different from livestream for daq_name, daq in self.instrument.daqs.items(): if daq_name in self.config['acquisition_view'].get('data_acquisition_tasks', {}).keys(): daq.tasks = self.config['acquisition_view']['data_acquisition_tasks'][daq_name]['tasks'] - # Tasks should be added and written in acquisition? # anchor grid in volume widget for anchor, widget in zip(self.volume_plan.anchor_widgets, self.volume_plan.grid_offset_widgets): @@ -204,6 +203,11 @@ def acquisition_ended(self) -> None: getattr(self, f'{operation}_dock').setDisabled(False) self.stop_button.setEnabled(False) + # write correct daq values if different from acquisition task + for daq_name, daq in self.instrument.daqs.items(): + if daq_name in self.config['instrument_view'].get('livestream_tasks', {}).keys(): + daq.tasks = self.config['instrument_view']['livestream_tasks'][daq_name]['tasks'] + # unanchor grid in volume widget # anchor grid in volume widget for anchor, widget in zip(self.volume_plan.anchor_widgets, self.volume_plan.grid_offset_widgets): diff --git a/src/view/instrument_view.py b/src/view/instrument_view.py index 76b0d8b..4b182e2 100644 --- a/src/view/instrument_view.py +++ b/src/view/instrument_view.py @@ -454,10 +454,10 @@ def setup_channel_widget(self) -> None: laser_button_group = QButtonGroup(widget) for channel, specs in self.channels.items(): button = QRadioButton(str(channel)) - button.setChecked(True) # Arbitrarily set last button checked button.toggled.connect(lambda value, ch=channel: self.change_channel(value, ch)) laser_button_group.addButton(button) widget_layout.addWidget(button) + button.setChecked(True) # Arbitrarily set last button checked widget.setLayout(widget_layout) widget.setSizePolicy(QSizePolicy.Maximum, QSizePolicy.Minimum) self.viewer.window.add_dock_widget(widget, area='bottom', name='Channels')