-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added back the shutter selector to the voltmeters display. #323
Changes from 3 commits
ae96f5b
18a004c
dc4093e
4d52213
15d1e89
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,6 +71,20 @@ async def update_devices(self, registry): | |
# Connect the details button signal | ||
details_slot = partial(self.details_window_requested.emit, ic.name) | ||
row.details_button.clicked.connect(details_slot) | ||
# Remove old shutters from the combobox | ||
for idx in range(self.ui.shutter_combobox.count()): | ||
self.ui.shutter_combobox.removeItem(idx) | ||
# Add the shutters to the shutter combobox | ||
shutters = registry.findall("shutters", allow_none=True) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would like explicitly remove 'front end shutter' from the list because it happens very often that ppl accidentally choose front end shutter. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree that the FES should not be available. Instead of hard-coding the name "front_end_shutter", though, I used the existing |
||
has_shutters = bool(len(shutters)) | ||
if has_shutters: | ||
self.ui.shutter_checkbox.setEnabled(True) | ||
for shutter in shutters: | ||
self.ui.shutter_combobox.addItem(shutter.name) | ||
else: | ||
log.warning("No shutters found, disabling checkbox.") | ||
self.ui.shutter_checkbox.setEnabled(False) | ||
self.ui.shutter_checkbox.setCheckState(False) | ||
|
||
def update_queue_status(self, status): | ||
super().update_queue_status(status) | ||
|
@@ -104,12 +118,13 @@ def record_dark_current(self): | |
|
||
""" | ||
# Determine which shutters to close | ||
shutters = [] | ||
kwargs = {} | ||
if self.ui.shutter_checkbox.isChecked(): | ||
shutters.append("experiment_shutter") | ||
shutter_name = self.ui.shutter_combobox.currentText() | ||
kwargs["shutters"] = [shutter_name] | ||
# Construct the plan | ||
ic_names = [ic.name for ic in self.ion_chambers] | ||
item = BPlan("record_dark_current", ic_names, shutters=shutters) | ||
item = BPlan("record_dark_current", ic_names, **kwargs) | ||
# Send it to the queue server | ||
self.queue_item_submitted.emit(item) | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we decided to remove front end shutter, the test should be modified too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.