Skip to content

Commit

Permalink
disable LEDs on start of iblrig
Browse files Browse the repository at this point in the history
  • Loading branch information
bimac committed Oct 13, 2023
1 parent 3339f14 commit 7c285f0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ Changelog

-------------------------------

8.10.3
------
* hot-fix for disabling Bpod status LED

8.10.2
------
* hot-fix parsing of path args in transfer_data
Expand Down
2 changes: 1 addition & 1 deletion iblrig/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# 3) Check CI and eventually wet lab test
# 4) Pull request to iblrigv8
# 5) git tag the release in accordance to the version number below (after merge!)
__version__ = '8.10.2'
__version__ = '8.10.3'

# The following method call will try to get post-release information (i.e. the number of commits since the last tagged
# release corresponding to the one above), plus information about the state of the local repository (dirty/broken)
Expand Down
8 changes: 8 additions & 0 deletions iblrig/gui/wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ def __init__(self, *args, **kwargs):
self.statusbar.addWidget(tmp)
self.controls_for_extra_parameters()

self.set_bpod_status_led(False)

self.setDisabled(True)
QtCore.QTimer.singleShot(100, self.check_dirty)
QtCore.QTimer.singleShot(100, self.check_for_update)
Expand All @@ -201,6 +203,7 @@ def eventFilter(self, obj, event):

def closeEvent(self, event):
if self.running_task_process is None:
self.set_bpod_status_led(True)
event.accept()
else:
msgBox = QtWidgets.QMessageBox(parent=self)
Expand All @@ -215,6 +218,7 @@ def closeEvent(self, event):
self.setEnabled(False)
self.repaint()
self.start_stop()
self.set_bpod_status_led(True)
event.accept()

def check_dirty(self):
Expand Down Expand Up @@ -525,6 +529,10 @@ def flush(self):
if not self.uiPushFlush.isChecked():
bpod.close()

def set_bpod_status_led(self, enabled: bool) -> None:
bpod = Bpod(self.model.hardware_settings['device_bpod']['COM_BPOD'])
bpod.set_status_led(enabled)

def help(self):
webbrowser.open('https://int-brain-lab.github.io/iblrig/usage.html')

Expand Down

0 comments on commit 7c285f0

Please sign in to comment.